diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-30 18:15:02 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-30 18:15:02 +0300 |
commit | a59e75a17f52d2c71501b0f61686b3a546501d60 (patch) | |
tree | ad6889d72645b7ac4daa0317f02dc40dc40070a1 /db/migrate/20150313012111_create_subscriptions_table.rb | |
parent | 2c0d9890e675c8799e76a69f7e432463fa06f996 (diff) |
Make the downtime_check task happy
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db/migrate/20150313012111_create_subscriptions_table.rb')
-rw-r--r-- | db/migrate/20150313012111_create_subscriptions_table.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/db/migrate/20150313012111_create_subscriptions_table.rb b/db/migrate/20150313012111_create_subscriptions_table.rb index 0977c9adfec..a9a8435330d 100644 --- a/db/migrate/20150313012111_create_subscriptions_table.rb +++ b/db/migrate/20150313012111_create_subscriptions_table.rb @@ -1,15 +1,17 @@ # rubocop:disable all class CreateSubscriptionsTable < ActiveRecord::Migration + DOWNTIME = false + def change create_table :subscriptions do |t| t.integer :user_id t.references :subscribable, polymorphic: true t.boolean :subscribed - + t.timestamps null: true end - add_index :subscriptions, + add_index :subscriptions, [:subscribable_id, :subscribable_type, :user_id], unique: true, name: 'subscriptions_user_id_and_ref_fields' |