Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
5d30d41dd27f
Commit
81878170
authored
Nov 17, 2016
by
Douglas Barbosa Alexandre
Browse files
Remove extra subscribable_type filter on migration
parent
83493307b55b
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/migrate/20161031174110_migrate_subscriptions_project_id.rb
View file @
5d30d41d
...
...
@@ -10,7 +10,7 @@ def up
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 @@ def up
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 @@ def up
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment