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-5.1.3 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-5.1.2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-5.1.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-5.1.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-3.1.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-3.0.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-4.0.0.rc2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-3.0.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.9.3 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.9.2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.9.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.8.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.7.3 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.7.2 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.7.1 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.7.0 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.6.8 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.6.7 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.6.6 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb
marty-2.6.5 spec/dummy/db/migrate/20171221095359_create_gemini_xyz_rules.rb