Sha256: 422537dc329aad5a32268e2cfa3a8f963ba129323a1b7e9335c42788bd419041

Contents?: true

Size: 385 Bytes

Versions: 1

Compression:

Stored size: 385 Bytes

Contents

class AddGistIndexToUnicoPeople < ActiveRecord::Migration
  def up
    execute <<-SQL
      CREATE EXTENSION IF NOT EXISTS pg_trgm;

      CREATE INDEX unico_people_name_gist_trgm_idx
        ON unico_people USING gist (name gist_trgm_ops);
    SQL
  end

  def down
    execute <<-SQL
      DROP INDEX unico_people_name_gist_trgm_idx;

      DROP EXTENSION pg_trgm;
    SQL
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unico-training-7.8.0 db/migrate/20130410130902_add_gist_index_to_unico_people.rb