1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-05 10:18:16 +09:00
mastodon/db/migrate/20161128103007_create_subscriptions.rb

16 lines
451 B
Ruby
Raw Normal View History

2016-11-28 21:36:47 +09:00
class CreateSubscriptions < ActiveRecord::Migration[5.0]
def change
create_table :subscriptions do |t|
t.string :callback_url, null: false, default: ''
t.string :secret
t.datetime :expires_at, null: true, default: nil
t.boolean :confirmed, null: false, default: false
t.integer :account_id, null: false
t.timestamps
end
add_index :subscriptions, [:callback_url, :account_id], unique: true
end
end