summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb2
-rw-r--r--db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb2
-rw-r--r--db/migrate/20160729173930_remove_project_id_from_spam_logs.rb2
-rw-r--r--db/migrate/20160823081327_change_merge_error_to_text.rb2
-rw-r--r--db/migrate/20160824124900_add_table_issue_metrics.rb2
-rw-r--r--db/migrate/20160825052008_add_table_merge_request_metrics.rb2
-rw-r--r--db/migrate/20160829114652_add_markdown_cache_columns.rb2
-rw-r--r--db/migrate/20160831214543_migrate_project_features.rb2
-rw-r--r--db/migrate/20160831223750_remove_features_enabled_from_projects.rb2
-rw-r--r--db/migrate/20160913162434_remove_projects_pushes_since_gc.rb2
-rw-r--r--db/migrate/20160913212128_change_artifacts_size_column.rb2
-rw-r--r--db/migrate/20160915042921_create_merge_requests_closing_issues.rb2
-rw-r--r--db/migrate/20160919144305_add_type_to_labels.rb2
-rw-r--r--db/migrate/20161014173530_create_label_priorities.rb2
-rw-r--r--db/migrate/20161017125927_add_unique_index_to_labels.rb2
-rw-r--r--db/migrate/20161018024215_migrate_labels_priority.rb2
-rw-r--r--db/migrate/20161018024550_remove_priority_from_labels.rb2
-rw-r--r--db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb4
-rw-r--r--db/migrate/20161019213545_generate_project_feature_for_projects.rb2
-rw-r--r--db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb2
-rw-r--r--db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb4
-rw-r--r--db/migrate/20161025231710_migrate_jira_to_gem.rb2
-rw-r--r--db/migrate/20161031174110_migrate_subscriptions_project_id.rb2
-rw-r--r--db/migrate/20161031181638_add_unique_index_to_subscriptions.rb2
-rw-r--r--db/migrate/20161103171205_rename_repository_storage_column.rb2
-rw-r--r--db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb2
-rw-r--r--db/migrate/20161130095245_fill_routes_table.rb2
-rw-r--r--db/migrate/20161130101252_fill_projects_routes_table.rb2
-rw-r--r--db/migrate/20161201160452_migrate_project_statistics.rb2
-rw-r--r--db/migrate/20161207231620_fixup_environment_name_uniqueness.rb2
-rw-r--r--db/migrate/20161207231621_create_environment_name_unique_index.rb2
-rw-r--r--db/migrate/20161207231626_add_environment_slug.rb2
-rw-r--r--db/migrate/20161209153400_add_unique_index_for_environment_slug.rb2
-rw-r--r--db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb2
34 files changed, 36 insertions, 36 deletions
diff --git a/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb b/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
index 1db0df92bec..cd5d4286b31 100644
--- a/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
+++ b/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
@@ -3,7 +3,7 @@
class MoveFromDevelopersCanMergeToProtectedBranchesMergeAccess < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = <<-HEREDOC
+ DOWNTIME_REASON = <<-HEREDOC.freeze
We're creating a `merge_access_level` for each `protected_branch`. If a user creates a `protected_branch` while this
is running, we might be left with a `protected_branch` _without_ an associated `merge_access_level`. The `protected_branches`
table must not change while this is running, so downtime is required.
diff --git a/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb b/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
index 5c3e189bb5b..45e3368fa9b 100644
--- a/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
+++ b/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
@@ -3,7 +3,7 @@
class MoveFromDevelopersCanPushToProtectedBranchesPushAccess < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = <<-HEREDOC
+ DOWNTIME_REASON = <<-HEREDOC.freeze
We're creating a `push_access_level` for each `protected_branch`. If a user creates a `protected_branch` while this
is running, we might be left with a `protected_branch` _without_ an associated `push_access_level`. The `protected_branches`
table must not change while this is running, so downtime is required.
diff --git a/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb b/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
index e28ab31d629..9995191ed9b 100644
--- a/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
+++ b/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
@@ -10,7 +10,7 @@ class RemoveProjectIdFromSpamLogs < ActiveRecord::Migration
# 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 = 'Removing a column that contains data that is not used anywhere.'
+ DOWNTIME_REASON = 'Removing a column that contains data that is not used anywhere.'.freeze
# 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/db/migrate/20160823081327_change_merge_error_to_text.rb b/db/migrate/20160823081327_change_merge_error_to_text.rb
index 7920389cd83..6dbf8a8d5e5 100644
--- a/db/migrate/20160823081327_change_merge_error_to_text.rb
+++ b/db/migrate/20160823081327_change_merge_error_to_text.rb
@@ -2,7 +2,7 @@ class ChangeMergeErrorToText < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'This migration requires downtime because it alters a column from varchar(255) to text.'
+ DOWNTIME_REASON = 'This migration requires downtime because it alters a column from varchar(255) to text.'.freeze
def change
change_column :merge_requests, :merge_error, :text, limit: 65535
diff --git a/db/migrate/20160824124900_add_table_issue_metrics.rb b/db/migrate/20160824124900_add_table_issue_metrics.rb
index e9bb79b3c62..9e52c54a35b 100644
--- a/db/migrate/20160824124900_add_table_issue_metrics.rb
+++ b/db/migrate/20160824124900_add_table_issue_metrics.rb
@@ -10,7 +10,7 @@ class AddTableIssueMetrics < ActiveRecord::Migration
# 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 = 'Adding foreign key'
+ DOWNTIME_REASON = 'Adding foreign key'.freeze
# 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/db/migrate/20160825052008_add_table_merge_request_metrics.rb b/db/migrate/20160825052008_add_table_merge_request_metrics.rb
index e01cc5038b9..195baf5f45b 100644
--- a/db/migrate/20160825052008_add_table_merge_request_metrics.rb
+++ b/db/migrate/20160825052008_add_table_merge_request_metrics.rb
@@ -10,7 +10,7 @@ class AddTableMergeRequestMetrics < ActiveRecord::Migration
# 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 = 'Adding foreign key'
+ DOWNTIME_REASON = 'Adding foreign key'.freeze
# 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/db/migrate/20160829114652_add_markdown_cache_columns.rb b/db/migrate/20160829114652_add_markdown_cache_columns.rb
index 8753e55e058..9cb44dfa9f9 100644
--- a/db/migrate/20160829114652_add_markdown_cache_columns.rb
+++ b/db/migrate/20160829114652_add_markdown_cache_columns.rb
@@ -26,7 +26,7 @@ class AddMarkdownCacheColumns < ActiveRecord::Migration
projects: [:description],
releases: [:description],
snippets: [:title, :content],
- }
+ }.freeze
def change
COLUMNS.each do |table, columns|
diff --git a/db/migrate/20160831214543_migrate_project_features.rb b/db/migrate/20160831214543_migrate_project_features.rb
index 93f9821bc76..79a5fb29d64 100644
--- a/db/migrate/20160831214543_migrate_project_features.rb
+++ b/db/migrate/20160831214543_migrate_project_features.rb
@@ -3,7 +3,7 @@ class MigrateProjectFeatures < ActiveRecord::Migration
DOWNTIME = true
DOWNTIME_REASON =
- <<-EOT
+ <<-EOT.freeze
Migrating issues_enabled, merge_requests_enabled, wiki_enabled, builds_enabled, snippets_enabled fields from projects to
a new table called project_features.
EOT
diff --git a/db/migrate/20160831223750_remove_features_enabled_from_projects.rb b/db/migrate/20160831223750_remove_features_enabled_from_projects.rb
index a2c207b49ea..8202c6a7b79 100644
--- a/db/migrate/20160831223750_remove_features_enabled_from_projects.rb
+++ b/db/migrate/20160831223750_remove_features_enabled_from_projects.rb
@@ -7,7 +7,7 @@ class RemoveFeaturesEnabledFromProjects < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME = true
- DOWNTIME_REASON = "Removing fields from database requires downtine."
+ DOWNTIME_REASON = "Removing fields from database requires downtine.".freeze
def up
remove_column :projects, :issues_enabled
diff --git a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
index 18ea9d43a43..919bfcdd86e 100644
--- a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
+++ b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
@@ -5,7 +5,7 @@ class RemoveProjectsPushesSinceGc < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'This migration removes an existing column'
+ DOWNTIME_REASON = 'This migration removes an existing column'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20160913212128_change_artifacts_size_column.rb b/db/migrate/20160913212128_change_artifacts_size_column.rb
index 063bbca537c..8cda4b66c5a 100644
--- a/db/migrate/20160913212128_change_artifacts_size_column.rb
+++ b/db/migrate/20160913212128_change_artifacts_size_column.rb
@@ -3,7 +3,7 @@ class ChangeArtifactsSizeColumn < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = 'Changing an integer column size requires a full table rewrite.'
+ DOWNTIME_REASON = 'Changing an integer column size requires a full table rewrite.'.freeze
def up
change_column :ci_builds, :artifacts_size, :integer, limit: 8
diff --git a/db/migrate/20160915042921_create_merge_requests_closing_issues.rb b/db/migrate/20160915042921_create_merge_requests_closing_issues.rb
index 94874a853da..105278d49f7 100644
--- a/db/migrate/20160915042921_create_merge_requests_closing_issues.rb
+++ b/db/migrate/20160915042921_create_merge_requests_closing_issues.rb
@@ -10,7 +10,7 @@ class CreateMergeRequestsClosingIssues < ActiveRecord::Migration
# 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 = 'Adding foreign keys'
+ DOWNTIME_REASON = 'Adding foreign keys'.freeze
# 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/db/migrate/20160919144305_add_type_to_labels.rb b/db/migrate/20160919144305_add_type_to_labels.rb
index 66172bda6ff..f028c9460d1 100644
--- a/db/migrate/20160919144305_add_type_to_labels.rb
+++ b/db/migrate/20160919144305_add_type_to_labels.rb
@@ -2,7 +2,7 @@ class AddTypeToLabels < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Labels will not work as expected until this migration is complete.'
+ DOWNTIME_REASON = 'Labels will not work as expected until this migration is complete.'.freeze
def change
add_column :labels, :type, :string
diff --git a/db/migrate/20161014173530_create_label_priorities.rb b/db/migrate/20161014173530_create_label_priorities.rb
index 2c22841c28a..73c9897631c 100644
--- a/db/migrate/20161014173530_create_label_priorities.rb
+++ b/db/migrate/20161014173530_create_label_priorities.rb
@@ -2,7 +2,7 @@ class CreateLabelPriorities < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'This migration adds foreign keys'
+ DOWNTIME_REASON = 'This migration adds foreign keys'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20161017125927_add_unique_index_to_labels.rb b/db/migrate/20161017125927_add_unique_index_to_labels.rb
index f2b56ebfb7b..5571160ccb4 100644
--- a/db/migrate/20161017125927_add_unique_index_to_labels.rb
+++ b/db/migrate/20161017125927_add_unique_index_to_labels.rb
@@ -2,7 +2,7 @@ class AddUniqueIndexToLabels < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'This migration removes duplicated labels.'
+ DOWNTIME_REASON = 'This migration removes duplicated labels.'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20161018024215_migrate_labels_priority.rb b/db/migrate/20161018024215_migrate_labels_priority.rb
index 22bec2382f4..9529bd3d494 100644
--- a/db/migrate/20161018024215_migrate_labels_priority.rb
+++ b/db/migrate/20161018024215_migrate_labels_priority.rb
@@ -2,7 +2,7 @@ class MigrateLabelsPriority < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Prioritized labels will not work as expected until this migration is complete.'
+ DOWNTIME_REASON = 'Prioritized labels will not work as expected until this migration is complete.'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20161018024550_remove_priority_from_labels.rb b/db/migrate/20161018024550_remove_priority_from_labels.rb
index b7416cca664..4415a2e91af 100644
--- a/db/migrate/20161018024550_remove_priority_from_labels.rb
+++ b/db/migrate/20161018024550_remove_priority_from_labels.rb
@@ -2,7 +2,7 @@ class RemovePriorityFromLabels < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'This migration removes an existing column'
+ DOWNTIME_REASON = 'This migration removes an existing column'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb b/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
index e875213ab96..9730ebb8f8a 100644
--- a/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
+++ b/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
@@ -8,7 +8,7 @@ class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = <<-EOF
+ DOWNTIME_REASON = <<-EOF.freeze
Moving Sidekiq jobs from queues requires Sidekiq to be stopped. Not stopping
Sidekiq will result in the loss of jobs that are scheduled after this
migration completes.
@@ -71,7 +71,7 @@ class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration
'StuckCiBuildsWorker' => :cronjob,
'UpdateMergeRequestsWorker' => :update_merge_requests
}
- }
+ }.freeze
def up
Sidekiq.redis do |redis|
diff --git a/db/migrate/20161019213545_generate_project_feature_for_projects.rb b/db/migrate/20161019213545_generate_project_feature_for_projects.rb
index 4554e14b0df..6486181575d 100644
--- a/db/migrate/20161019213545_generate_project_feature_for_projects.rb
+++ b/db/migrate/20161019213545_generate_project_feature_for_projects.rb
@@ -1,7 +1,7 @@
class GenerateProjectFeatureForProjects < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = <<-HEREDOC
+ DOWNTIME_REASON = <<-HEREDOC.freeze
Application was eager loading project_feature for all projects generating an extra query
everytime a project was fetched. We removed that behavior to avoid the extra query, this migration
makes sure all projects have a project_feature record associated.
diff --git a/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb b/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
index 2abfe47b776..b396c03ecbf 100644
--- a/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
+++ b/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
@@ -12,7 +12,7 @@ class AddPipelineIdToMergeRequestMetrics < ActiveRecord::Migration
# 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 = 'Adding a foreign key'
+ DOWNTIME_REASON = 'Adding a foreign key'.freeze
# 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/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb b/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
index 06d07bdb835..4167ccae39b 100644
--- a/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
+++ b/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
@@ -8,7 +8,7 @@ class MigrateMailroomQueueFromDefault < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = <<-EOF
+ DOWNTIME_REASON = <<-EOF.freeze
Moving Sidekiq jobs from queues requires Sidekiq to be stopped. Not stopping
Sidekiq will result in the loss of jobs that are scheduled after this
migration completes.
@@ -25,7 +25,7 @@ class MigrateMailroomQueueFromDefault < ActiveRecord::Migration
incoming_email: {
'EmailReceiverWorker' => :email_receiver
}
- }
+ }.freeze
def up
Sidekiq.redis do |redis|
diff --git a/db/migrate/20161025231710_migrate_jira_to_gem.rb b/db/migrate/20161025231710_migrate_jira_to_gem.rb
index 870b00411d2..38824ba9fe5 100644
--- a/db/migrate/20161025231710_migrate_jira_to_gem.rb
+++ b/db/migrate/20161025231710_migrate_jira_to_gem.rb
@@ -1,7 +1,7 @@
class MigrateJiraToGem < ActiveRecord::Migration
DOWNTIME = true
- DOWNTIME_REASON = <<-HEREDOC
+ DOWNTIME_REASON = <<-HEREDOC.freeze
Refactor all Jira services properties(serialized field) to use new jira-ruby gem.
There were properties on old Jira service that are not needed anymore after the
service refactoring: api_url, project_url, new_issue_url, issues_url.
diff --git a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb
index 549145a0a65..130b5f556ff 100644
--- a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb
+++ b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb
@@ -2,7 +2,7 @@ class MigrateSubscriptionsProjectId < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Subscriptions will not work as expected until this migration is complete.'
+ DOWNTIME_REASON = 'Subscriptions will not work as expected until this migration is complete.'.freeze
def up
execute <<-EOF.strip_heredoc
diff --git a/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb b/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb
index 4b1b29e1265..1b675a36db7 100644
--- a/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb
+++ b/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb
@@ -2,7 +2,7 @@ class AddUniqueIndexToSubscriptions < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'This migration requires downtime because it changes a column to not accept null values.'
+ DOWNTIME_REASON = 'This migration requires downtime because it changes a column to not accept null values.'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20161103171205_rename_repository_storage_column.rb b/db/migrate/20161103171205_rename_repository_storage_column.rb
index 93280573939..32d22e630d8 100644
--- a/db/migrate/20161103171205_rename_repository_storage_column.rb
+++ b/db/migrate/20161103171205_rename_repository_storage_column.rb
@@ -10,7 +10,7 @@ class RenameRepositoryStorageColumn < ActiveRecord::Migration
# 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 = 'Renaming the application_settings.repository_storage column'
+ DOWNTIME_REASON = 'Renaming the application_settings.repository_storage column'.freeze
# 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/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
index 77e0c40d850..633f57ef600 100644
--- a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
+++ b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
@@ -25,7 +25,7 @@ class MigrateProcessCommitWorkerJobs < ActiveRecord::Migration
end
DOWNTIME = true
- DOWNTIME_REASON = 'Existing workers will error until they are using a newer version of the code'
+ DOWNTIME_REASON = 'Existing workers will error until they are using a newer version of the code'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20161130095245_fill_routes_table.rb b/db/migrate/20161130095245_fill_routes_table.rb
index c3536d6d911..ccd2cceee0c 100644
--- a/db/migrate/20161130095245_fill_routes_table.rb
+++ b/db/migrate/20161130095245_fill_routes_table.rb
@@ -5,7 +5,7 @@ class FillRoutesTable < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'No new namespaces should be created during data copy'
+ DOWNTIME_REASON = 'No new namespaces should be created during data copy'.freeze
def up
execute <<-EOF
diff --git a/db/migrate/20161130101252_fill_projects_routes_table.rb b/db/migrate/20161130101252_fill_projects_routes_table.rb
index 56ba6fcdbe3..5e7d0e75ad8 100644
--- a/db/migrate/20161130101252_fill_projects_routes_table.rb
+++ b/db/migrate/20161130101252_fill_projects_routes_table.rb
@@ -5,7 +5,7 @@ class FillProjectsRoutesTable < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'No new projects should be created during data copy'
+ DOWNTIME_REASON = 'No new projects should be created during data copy'.freeze
def up
if Gitlab::Database.postgresql?
diff --git a/db/migrate/20161201160452_migrate_project_statistics.rb b/db/migrate/20161201160452_migrate_project_statistics.rb
index 3ae3f2c159b..afd5ce95068 100644
--- a/db/migrate/20161201160452_migrate_project_statistics.rb
+++ b/db/migrate/20161201160452_migrate_project_statistics.rb
@@ -2,7 +2,7 @@ class MigrateProjectStatistics < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Removes two columns from the projects table'
+ DOWNTIME_REASON = 'Removes two columns from the projects table'.freeze
def up
# convert repository_size in float (megabytes) to integer (bytes),
diff --git a/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb b/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb
index b74552e762d..57f28e809de 100644
--- a/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb
+++ b/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb
@@ -2,7 +2,7 @@ class FixupEnvironmentNameUniqueness < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Renaming non-unique environments'
+ DOWNTIME_REASON = 'Renaming non-unique environments'.freeze
def up
environments = Arel::Table.new(:environments)
diff --git a/db/migrate/20161207231621_create_environment_name_unique_index.rb b/db/migrate/20161207231621_create_environment_name_unique_index.rb
index ac680c8d10f..94fa3b6838c 100644
--- a/db/migrate/20161207231621_create_environment_name_unique_index.rb
+++ b/db/migrate/20161207231621_create_environment_name_unique_index.rb
@@ -4,7 +4,7 @@ class CreateEnvironmentNameUniqueIndex < ActiveRecord::Migration
disable_ddl_transaction!
DOWNTIME = true
- DOWNTIME_REASON = 'Making a non-unique index into a unique index'
+ DOWNTIME_REASON = 'Making a non-unique index into a unique index'.freeze
def up
remove_index :environments, [:project_id, :name]
diff --git a/db/migrate/20161207231626_add_environment_slug.rb b/db/migrate/20161207231626_add_environment_slug.rb
index 8e98ee5b9ba..aec08dc79f2 100644
--- a/db/migrate/20161207231626_add_environment_slug.rb
+++ b/db/migrate/20161207231626_add_environment_slug.rb
@@ -5,7 +5,7 @@ class AddEnvironmentSlug < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Adding NOT NULL column environments.slug with dependent data'
+ DOWNTIME_REASON = 'Adding NOT NULL column environments.slug with dependent data'.freeze
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
diff --git a/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb b/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb
index e9fcef1cd45..fbf6e4c2a45 100644
--- a/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb
+++ b/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb
@@ -5,7 +5,7 @@ class AddUniqueIndexForEnvironmentSlug < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
- DOWNTIME_REASON = 'Adding a *unique* index to environments.slug'
+ DOWNTIME_REASON = 'Adding a *unique* index to environments.slug'.freeze
disable_ddl_transaction!
diff --git a/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb b/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb
index 69bfa2d3fc4..2b2b7ab27ce 100644
--- a/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb
+++ b/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb
@@ -9,7 +9,7 @@ class AddForeignKeysToTimelogs < ActiveRecord::Migration
# 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 = ''.freeze
# 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