Skip to content
Snippets Groups Projects
Commit 4a344a15 authored by Tiago Botelho's avatar Tiago Botelho
Browse files

Adds migration to ensure all remote mirror columns get created

parent c5adf04c
No related branches found
No related tags found
No related merge requests found
---
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
Loading
Loading
@@ -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"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment