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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
630eb119
Commit
630eb119
authored
Nov 04, 2016
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming columns requires downtime
parent
5ef2bd19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
db/migrate/20161103171205_rename_repository_storage_column.rb
...igrate/20161103171205_rename_repository_storage_column.rb
+2
-2
doc/development/what_requires_downtime.md
doc/development/what_requires_downtime.md
+6
-0
No files found.
db/migrate/20161103171205_rename_repository_storage_column.rb
View file @
630eb119
...
@@ -5,12 +5,12 @@ class RenameRepositoryStorageColumn < ActiveRecord::Migration
...
@@ -5,12 +5,12 @@ class RenameRepositoryStorageColumn < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
fals
e
DOWNTIME
=
tru
e
# When a migration requires downtime you **must** uncomment the following
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
# constant and define a short and easy to understand explanation as to why the
# migration requires downtime.
# migration requires downtime.
# DOWNTIME_REASON = '
'
DOWNTIME_REASON
=
'Renaming the application_settings.repository_storage column
'
# When using the methods "add_concurrent_index" or "add_column_with_default"
# When using the methods "add_concurrent_index" or "add_column_with_default"
# you must disable the use of transactions as these methods can not run in an
# you must disable the use of transactions as these methods can not run in an
...
...
doc/development/what_requires_downtime.md
View file @
630eb119
...
@@ -66,6 +66,12 @@ producing errors whenever it tries to use the `dummy` column.
...
@@ -66,6 +66,12 @@ producing errors whenever it tries to use the `dummy` column.
As a result of the above downtime _is_ required when removing a column, even
As a result of the above downtime _is_ required when removing a column, even
when using PostgreSQL.
when using PostgreSQL.
## Renaming Columns
Renaming columns requires downtime as running GitLab instances will continue
using the old column name until a new version is deployed. This can result
in the instance producing errors, which in turn can impact the user experience.
## Changing Column Constraints
## Changing Column Constraints
Generally changing column constraints requires checking all rows in the table to
Generally changing column constraints requires checking all rows in the table to
...
...
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