1
0

20161128103007_create_subscriptions.rb 482 B

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