You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
451 B

  1. class CreateSubscriptions < ActiveRecord::Migration[5.0]
  2. def change
  3. create_table :subscriptions do |t|
  4. t.string :callback_url, null: false, default: ''
  5. t.string :secret
  6. t.datetime :expires_at, null: true, default: nil
  7. t.boolean :confirmed, null: false, default: false
  8. t.integer :account_id, null: false
  9. t.timestamps
  10. end
  11. add_index :subscriptions, [:callback_url, :account_id], unique: true
  12. end
  13. end