BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4a344a15
Commit
4a344a15
authored
May 29, 2018
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds migration to ensure all remote mirror columns get created
parent
c5adf04c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
ensure-remote-mirror-columns-in-ce.yml
changelogs/unreleased/ensure-remote-mirror-columns-in-ce.yml
+5
-0
20180529093006_ensure_remote_mirror_columns.rb
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
+24
-0
schema.rb
db/schema.rb
+1
-1
No files found.
changelogs/unreleased/ensure-remote-mirror-columns-in-ce.yml
0 → 100644
View file @
4a344a15
---
title
:
Fix remote mirror database inconsistencies when upgrading from EE to CE
merge_request
:
19196
author
:
type
:
fixed
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
0 → 100644
View file @
4a344a15
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
db/schema.rb
View file @
4a344a15
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2018052
413201
6
)
do
ActiveRecord
::
Schema
.
define
(
version:
2018052
909300
6
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment