Sha256: 1562ac3a32b992375a9a9aa15d5c535ab271f28eb15a50938ba9c3a29341d660

Contents?: true

Size: 593 Bytes

Versions: 1

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true

Sequel.migration do
  up do
    add_column :push_notification_devices, :tsv, 'TSVector'
    add_index :push_notification_devices, :tsv, type: 'GIN'
    create_trigger :push_notification_devices, :tsv, :tsvector_update_trigger,
                   args: %i[tsv pg_catalog.english token alias locale timezone],
                   events: %i[insert update],
                   each_row: true
  end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-push-notification-0.6.0 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb