Commit 99294e09 authored by Lin Jen-Shin's avatar Lin Jen-Shin

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
parent 8cc4a39b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment