Commit 31413f4c authored by Douwe Maan's avatar Douwe Maan

Merge branch '46630-add-missing-columns-to-project-mirror-data' into 'master'

Upgrading from EE to CE fails on project_mirror_data migrations

Closes #46630

See merge request gitlab-org/gitlab-ce!19109
parents 83796a71 b92b1e8d
---
title: Fix project mirror database inconsistencies when upgrading from EE to CE
merge_request: 19109
author:
type: fixed
class EnsureMissingColumnsToProjectMirrorData < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
add_column :project_mirror_data, :status, :string unless column_exists?(:project_mirror_data, :status)
add_column :project_mirror_data, :jid, :string unless column_exists?(:project_mirror_data, :jid)
add_column :project_mirror_data, :last_error, :text unless column_exists?(:project_mirror_data, :last_error)
end
def down
# db/migrate/20180502122856_create_project_mirror_data.rb will remove the table
end
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