summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2016-11-04 12:55:15 +0000
committerNick Thomas <nick@gitlab.com>2016-11-07 10:57:08 +0000
commit630eb119cb99eb971a9e29d83293774b5b882490 (patch)
tree1e1d20cbebe2cd33e922b73ab5e7c239a808eb1d
parent5ef2bd192aa9b3ecbfc23e83c6984e2a818fb736 (diff)
downloadgitlab-ce-630eb119cb99eb971a9e29d83293774b5b882490.tar.gz
Renaming columns requires downtime
-rw-r--r--db/migrate/20161103171205_rename_repository_storage_column.rb4
-rw-r--r--doc/development/what_requires_downtime.md6
2 files changed, 8 insertions, 2 deletions
diff --git a/db/migrate/20161103171205_rename_repository_storage_column.rb b/db/migrate/20161103171205_rename_repository_storage_column.rb
index e9f992793b4..93280573939 100644
--- a/db/migrate/20161103171205_rename_repository_storage_column.rb
+++ b/db/migrate/20161103171205_rename_repository_storage_column.rb
@@ -5,12 +5,12 @@ class RenameRepositoryStorageColumn < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
- DOWNTIME = false
+ DOWNTIME = true
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
# 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"
# you must disable the use of transactions as these methods can not run in an
diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md
index 2574c2c0472..bbcd26477f3 100644
--- a/doc/development/what_requires_downtime.md
+++ b/doc/development/what_requires_downtime.md
@@ -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
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
Generally changing column constraints requires checking all rows in the table to