Sha256: 56ef1daf33d5abd646eb1566a9681107bf87dca6f2becbad582eebb6205832c4

Contents?: true

Size: 481 Bytes

Versions: 1

Compression:

Stored size: 481 Bytes

Contents

Sequel.migration do
  up do
    add_column :passbook_passes, :tsv, 'TSVector'
    add_index :passbook_passes, :tsv, type: "GIN"
    create_trigger :passbook_passes, :tsv, :tsvector_update_trigger, 
      args: [:tsv, :'pg_catalog.english', :pass_type_identifier, :serial_number], 
      events: [:insert, :update], 
      each_row: true
  end

  down do
    drop_column :passbook_passes, :tsv
    drop_index :passbook_passes, :tsv
    drop_trigger :passbook_passes, :tsv
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-passbook-0.2.0 ./lib/rack/passbook/migrations/002_add_full_text_search.rb