Module: ChronoModel::Json

Extended by:
Json
Included in:
Json
Defined in:
lib/chrono_model/json.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
# File 'lib/chrono_model/json.rb', line 6

def create
  puts "ChronoModel: WARNING - JSON ops are deprecated. Please migrate to JSONB"

  adapter.execute 'CREATE OR REPLACE LANGUAGE plpythonu'
  adapter.execute File.read(sql 'json_ops.sql')
end

#dropObject



13
14
15
16
# File 'lib/chrono_model/json.rb', line 13

def drop
  adapter.execute File.read(sql 'uninstall-json_ops.sql')
  adapter.execute 'DROP LANGUAGE IF EXISTS plpythonu'
end