Sha256: c16c6763fea3e4be53c6b00be852eaf0ca72c99f484da867badfec479b93b489

Contents?: true

Size: 764 Bytes

Versions: 94

Compression:

Stored size: 764 Bytes

Contents

class CreateMartyGridIndexInt4ranges < ActiveRecord::Migration[4.2]
  include Marty::Migrations

  def change
    table_name = "marty_grid_index_int4ranges"

    # drop deprecated version
    execute("DROP TABLE IF EXISTS #{table_name}")

    create_table table_name do |t|
      t.datetime :created_dt, null: false
      t.references :data_grid, null: false
      t.string :attr, null: false
      t.int4range :key, null: false
      t.integer :index, null: false
    end

    # FIXME: not sure if this index is appropriate for our queries.
    # May need to break it up.
    add_index table_name,
    [:created_dt, :data_grid_id, :attr],
    name: "index_#{table_name}"
    add_index table_name, :key, using: "GIST"

    add_fk table_name, :data_grids
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
marty-5.1.3 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-5.1.2 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-5.1.1 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-5.1.0 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-3.1.0 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-3.0.1 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-4.0.0.rc2 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-3.0.0 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.9.3 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.9.2 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.9.1 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.8.0 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.7.3 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.7.2 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.7.1 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.7.0 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.6.8 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.6.7 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.6.6 db/migrate/102_create_marty_grid_index_int4ranges.rb
marty-2.6.5 db/migrate/102_create_marty_grid_index_int4ranges.rb