1
0

20161128103007_create_subscriptions.rb 451 B

123456789101112131415
  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