diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-17 13:50:14 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-17 15:10:13 -0200 |
commit | 81878170a7a3bd5426f6e1241c6b73d01c8c46a6 (patch) | |
tree | edc61fc6f0d58b556ebe905e7ba2627c49ad4f75 | |
parent | 23f45e842cbe366c1992b7cf1472a4039b9a69ea (diff) | |
download | gitlab-ce-81878170a7a3bd5426f6e1241c6b73d01c8c46a6.tar.gz |
Remove extra subscribable_type filter on migration
-rw-r--r-- | db/migrate/20161031174110_migrate_subscriptions_project_id.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb index 9e1bdb7c567..549145a0a65 100644 --- a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb +++ b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb @@ -10,7 +10,7 @@ class MigrateSubscriptionsProjectId < ActiveRecord::Migration SET project_id = ( SELECT issues.project_id FROM issues - WHERE issues.id = subscriptions.subscribable_id AND subscriptions.subscribable_type = 'Issue' + WHERE issues.id = subscriptions.subscribable_id ) WHERE subscriptions.subscribable_type = 'Issue'; EOF @@ -20,7 +20,7 @@ class MigrateSubscriptionsProjectId < ActiveRecord::Migration SET project_id = ( SELECT merge_requests.target_project_id FROM merge_requests - WHERE merge_requests.id = subscriptions.subscribable_id AND subscriptions.subscribable_type = 'MergeRequest' + WHERE merge_requests.id = subscriptions.subscribable_id ) WHERE subscriptions.subscribable_type = 'MergeRequest'; EOF @@ -30,7 +30,7 @@ class MigrateSubscriptionsProjectId < ActiveRecord::Migration SET project_id = ( SELECT projects.id FROM labels INNER JOIN projects ON projects.id = labels.project_id - WHERE labels.id = subscriptions.subscribable_id AND subscriptions.subscribable_type = 'Label' + WHERE labels.id = subscriptions.subscribable_id ) WHERE subscriptions.subscribable_type = 'Label'; EOF |