diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 18:06:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 18:06:24 +0300 |
commit | 88542a5e9613c8442a982e65ad5cf13eb33bc541 (patch) | |
tree | 11a65d86e623b443b8a2976cc93cff360e2da8a2 /db/migrate/20180711103851_drop_duplicate_protected_tags.rb | |
parent | b570d73ecd31e2ca9cf8c2f1adb056edf2869477 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20180711103851_drop_duplicate_protected_tags.rb')
-rw-r--r-- | db/migrate/20180711103851_drop_duplicate_protected_tags.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/db/migrate/20180711103851_drop_duplicate_protected_tags.rb b/db/migrate/20180711103851_drop_duplicate_protected_tags.rb index 6166aa65f1f..94f72aa162d 100644 --- a/db/migrate/20180711103851_drop_duplicate_protected_tags.rb +++ b/db/migrate/20180711103851_drop_duplicate_protected_tags.rb @@ -29,14 +29,7 @@ class DropDuplicateProtectedTags < ActiveRecord::Migration[4.2] .where(project_id: projects) .where.not(id: ids) - if Gitlab::Database.postgresql? - tags.delete_all - else - # Workaround needed for MySQL - sql = "SELECT id FROM (#{tags.to_sql}) protected_tags" - - ProtectedTag.where("id IN (#{sql})").delete_all # rubocop:disable GitlabSecurity/SqlInjection - end + tags.delete_all end end |