This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2023-07-12 00:47:08 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-28 04:36:47 -08: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
|