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
dc2fbdc6
Commit
dc2fbdc6
authored
May 11, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip renaming column in EE when it was already created with the new name in CE
parent
bc36b39a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ee/db/migrate/20171129150921_rename_remote_mirror_available_to_mirror_available.rb
...921_rename_remote_mirror_available_to_mirror_available.rb
+5
-0
ee/db/post_migrate/20171201140229_cleanup_remote_mirror_available_rename.rb
.../20171201140229_cleanup_remote_mirror_available_rename.rb
+5
-0
No files found.
ee/db/migrate/20171129150921_rename_remote_mirror_available_to_mirror_available.rb
View file @
dc2fbdc6
...
...
@@ -6,10 +6,15 @@ class RenameRemoteMirrorAvailableToMirrorAvailable < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# When moving from CE to EE, the column may already have been renamed.
return
if
column_exists?
(
:application_settings
,
:mirror_available
)
rename_column_concurrently
:application_settings
,
:remote_mirror_available
,
:mirror_available
end
def
down
return
unless
column_exists?
(
:application_settings
,
:mirror_available
)
cleanup_concurrent_column_rename
:application_settings
,
:mirror_available
,
:remote_mirror_available
end
end
ee/db/post_migrate/20171201140229_cleanup_remote_mirror_available_rename.rb
View file @
dc2fbdc6
...
...
@@ -6,10 +6,15 @@ class CleanupRemoteMirrorAvailableRename < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# When moving from CE to EE, the column may already have been renamed.
return
unless
column_exists?
(
:application_settings
,
:remote_mirror_available
)
cleanup_concurrent_column_rename
:application_settings
,
:remote_mirror_available
,
:mirror_available
end
def
down
return
if
column_exists?
(
:application_settings
,
:remote_mirror_available
)
rename_column_concurrently
:application_settings
,
:mirror_available
,
:remote_mirror_available
end
end
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