summaryrefslogtreecommitdiff
path: root/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb')
-rw-r--r--db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb b/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb
deleted file mode 100644
index a400a071e07..00000000000
--- a/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class PopulateMissingProjectCiCdSettings < ActiveRecord::Migration[4.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- # Projects created after the initial migration but before the code started
- # using ProjectCiCdSetting won't have a corresponding row in
- # project_ci_cd_settings, so let's fix that.
- execute <<~SQL
- INSERT INTO project_ci_cd_settings (project_id)
- SELECT id
- FROM projects
- WHERE NOT EXISTS (
- SELECT 1
- FROM project_ci_cd_settings
- WHERE project_ci_cd_settings.project_id = projects.id
- )
- SQL
- end
-
- def down
- # There's nothing to revert for this migration.
- end
-end