Sha256: 4613193e2a11560b268e6b3f7fac4ad071ae7c021c61bf6836827f50eb60918d

Contents?: true

Size: 770 Bytes

Versions: 94

Compression:

Stored size: 770 Bytes

Contents

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

  def change
    table_name = "marty_grid_index_integers"

    # 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.integer :key, array: true, 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: "GIN"

    add_fk table_name, :data_grids
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

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