Sha256: 2800ebf062e649f2d5b138cfd0e14836e709405bba9475546d8a63054964b166

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

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: [:tsv, :'pg_catalog.english', :token, :alias, :locale, :timezone],
      events: [: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

6 entries across 6 versions & 1 rubygems

Version Path
rack-push-notification-0.5.3 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb
rack-push-notification-0.5.2 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb
rack-push-notification-0.5.1 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb
rack-push-notification-0.5.0 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb
rack-push-notification-0.4.1 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb
rack-push-notification-0.4.0 ./lib/rack/push-notification/migrations/002_add_full_text_search.rb