Sha256: dd1cfe6a525267399f5d5f6ac00697f564d646d75f320b684abe18e13e84e8c6

Contents?: true

Size: 869 Bytes

Versions: 103

Compression:

Stored size: 869 Bytes

Contents

class CreateGeminiXyzRules < McflyMigration
  include Marty::Migrations
  def change()
    create_table :gemini_xyz_rules do |t|
      t.string :name, null: false
      t.column :rule_type, :xyz_rule_type, null: false
      t.datetime :start_dt, null: false
      t.datetime :end_dt, null: true
      t.string :engine, null: false, default: 'Gemini::XyzRuleScriptSet'
      t.jsonb :simple_guards,    null: false, default: {}
      t.json  :computed_guards,  null: false, default: {}
      t.jsonb :grids,            null: false, default: {}
      t.json  :results,          null: false, default: {}
      t.jsonb :fixed_results,    null: false, default: {}
    end
    execute("CREATE OR REPLACE FUNCTION to_numrange(val text) "\
            "RETURNS numrange AS "\
            "$BODY$ select numrange(val); $BODY$ "\
            "LANGUAGE SQL IMMUTABLE;")
   end
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
marty-14.3.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-14.0.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-13.0.2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-11.0.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-10.0.3 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-10.0.2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-10.0.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-9.5.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-9.5.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-9.3.3 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-9.3.2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-9.3.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-8.5.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-8.4.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-8.3.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-8.2.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-8.0.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-6.1.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-5.2.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-5.1.4 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb