Files
fizzy/db/migrate/20250714222221_add_push_subscriptions.rb
T
Jason Zimdars 0afc738d19 Whitespace
2025-07-21 20:11:03 -05:00

18 lines
471 B
Ruby

class AddPushSubscriptions < ActiveRecord::Migration[8.1]
def change
create_table :push_subscriptions do |t|
t.references :user, null: false, foreign_key: true
t.string :endpoint
t.string :p256dh_key
t.string :auth_key
t.string :user_agent
t.timestamps
t.index [ :user_id, :endpoint ], unique: true
t.index :endpoint
t.index :user_agent
t.index [ "endpoint", "p256dh_key", "auth_key" ]
end
end
end