Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
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
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
changelogs/unreleased/ensure-remote-mirror-columns-in-ce.yml
changelogs/unreleased/ensure-remote-mirror-columns-in-ce.yml
+5
-0
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
+24
-0
db/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