summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-03-24 22:05:39 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-03-24 22:13:01 +0800
commit99294e09b8c33b924c28a272e6d258bd9c4daa93 (patch)
tree3340ff388ba8ff2b863c3bcd5331d194e9fa04cb /db/migrate
parent8cc4a39be8d1bf31fe082829be209c6969647ab4 (diff)
downloadgitlab-ce-99294e09b8c33b924c28a272e6d258bd9c4daa93.tar.gz
Do nothing if ci_builds.job_id isn't there
This is really weird. I think we did get the same issue while migrating on GitLab.com. We fixed this by adding job_id to ci_builds table manually, and then run the migrations again. However I think we didn't hit into this on staging, which should somehow be a production clone. At any rate, I guess we could check if the column exists in the migration. If the column is not there, there's no point to remove that column anyway. Closes #29976
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb b/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
index 1e2abea5254..69dd15b8b4e 100644
--- a/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
+++ b/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
@@ -17,7 +17,7 @@ class RemoveUnusedCiTablesAndColumns < ActiveRecord::Migration
end
remove_column :ci_pipelines, :push_data, :text
- remove_column :ci_builds, :job_id, :integer
+ remove_column :ci_builds, :job_id, :integer if column_exists?(:ci_builds, :job_id)
remove_column :ci_builds, :deploy, :boolean
end