Sha256: bda9bd138529e6d6e3b120a8e7d5e902e697c91748c59e61de8bb3335f8bb602

Contents?: true

Size: 747 Bytes

Versions: 72

Compression:

Stored size: 747 Bytes

Contents

class CreateMartyGridIndexStrings < ActiveRecord::Migration
  include Marty::Migrations

  def change
    table_name = "marty_grid_index_strings"

    # 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.text :key, array: true
      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

72 entries across 72 versions & 1 rubygems

Version Path
marty-1.2.9 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.8 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.7 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.6 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.5 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.4 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.3 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.2 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.1 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.2.0 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.9 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.8 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.7 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.6 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.5 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.4 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.3 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.2 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.1.1 db/migrate/104_create_marty_grid_index_strings.rb
marty-1.0.54 db/migrate/104_create_marty_grid_index_strings.rb