BigW Consortium Gitlab

Commit 516c0076 by Douwe Maan

Merge branch 'ensure-remote-mirror-columns-in-ce' into 'master'

Adds migration to ensure all remote mirror columns get created Closes #46775 See merge request gitlab-org/gitlab-ce!19196
parents c5adf04c 4a344a15
---
title: Fix remote mirror database inconsistencies when upgrading from EE to CE
merge_request: 19196
author:
type: fixed
class EnsureRemoteMirrorColumns < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_column :remote_mirrors, :last_update_started_at, :datetime unless column_exists?(:remote_mirrors, :last_update_started_at)
add_column :remote_mirrors, :remote_name, :string unless column_exists?(:remote_mirrors, :remote_name)
unless column_exists?(:remote_mirrors, :only_protected_branches)
add_column_with_default(:remote_mirrors,
:only_protected_branches,
:boolean,
default: false,
allow_null: false)
end
end
def down
# db/migrate/20180503131624_create_remote_mirrors.rb will remove the table
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180524132016) do
ActiveRecord::Schema.define(version: 20180529093006) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......
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