Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
601709274b00
Commit
0a5b670a
authored
Feb 22, 2017
by
Douwe Maan
Browse files
Exclude migrations from Style/MutableConstant
parent
d4b1f62b6acd
Changes
35
Hide whitespace changes
Inline
Side-by-side
.rubocop.yml
View file @
60170927
...
...
@@ -354,6 +354,9 @@ Style/MultilineTernaryOperator:
# mutable literal (e.g. array or hash).
Style/MutableConstant
:
Enabled
:
true
Exclude
:
-
'
db/migrate/**/*'
-
'
db/post_migrate/**/*'
# Favor unless over if for negative conditions (or control flow or).
Style/NegatedIf
:
...
...
db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
View file @
60170927
...
...
@@ -3,7 +3,7 @@
class
MoveFromDevelopersCanMergeToProtectedBranchesMergeAccess
<
ActiveRecord
::
Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
<<-
HEREDOC
.
freeze
DOWNTIME_REASON
=
<<-
HEREDOC
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.
...
...
db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
View file @
60170927
...
...
@@ -3,7 +3,7 @@
class
MoveFromDevelopersCanPushToProtectedBranchesPushAccess
<
ActiveRecord
::
Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
<<-
HEREDOC
.
freeze
DOWNTIME_REASON
=
<<-
HEREDOC
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.
...
...
db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
View file @
60170927
...
...
@@ -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.'
.
freeze
DOWNTIME_REASON
=
'Removing a column that contains data that is not used anywhere.'
# 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
...
...
db/migrate/20160823081327_change_merge_error_to_text.rb
View file @
60170927
...
...
@@ -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.'
.
freeze
DOWNTIME_REASON
=
'This migration requires downtime because it alters a column from varchar(255) to text.'
def
change
change_column
:merge_requests
,
:merge_error
,
:text
,
limit:
65535
...
...
db/migrate/20160824124900_add_table_issue_metrics.rb
View file @
60170927
...
...
@@ -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'
.
freeze
DOWNTIME_REASON
=
'Adding foreign key'
# 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
...
...
db/migrate/20160825052008_add_table_merge_request_metrics.rb
View file @
60170927
...
...
@@ -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'
.
freeze
DOWNTIME_REASON
=
'Adding foreign key'
# 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
...
...
db/migrate/20160831223750_remove_features_enabled_from_projects.rb
View file @
60170927
...
...
@@ -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."
.
freeze
DOWNTIME_REASON
=
"Removing fields from database requires downtine."
def
up
remove_column
:projects
,
:issues_enabled
...
...
db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
View file @
60170927
...
...
@@ -5,7 +5,7 @@ class RemoveProjectsPushesSinceGc < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
true
DOWNTIME_REASON
=
'This migration removes an existing column'
.
freeze
DOWNTIME_REASON
=
'This migration removes an existing column'
disable_ddl_transaction!
...
...
db/migrate/20160913212128_change_artifacts_size_column.rb
View file @
60170927
...
...
@@ -3,7 +3,7 @@ class ChangeArtifactsSizeColumn < ActiveRecord::Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
'Changing an integer column size requires a full table rewrite.'
.
freeze
DOWNTIME_REASON
=
'Changing an integer column size requires a full table rewrite.'
def
up
change_column
:ci_builds
,
:artifacts_size
,
:integer
,
limit:
8
...
...
db/migrate/20160915042921_create_merge_requests_closing_issues.rb
View file @
60170927
...
...
@@ -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'
.
freeze
DOWNTIME_REASON
=
'Adding foreign keys'
# 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
...
...
db/migrate/20160919144305_add_type_to_labels.rb
View file @
60170927
...
...
@@ -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.'
.
freeze
DOWNTIME_REASON
=
'Labels will not work as expected until this migration is complete.'
def
change
add_column
:labels
,
:type
,
:string
...
...
db/migrate/20161014173530_create_label_priorities.rb
View file @
60170927
...
...
@@ -2,7 +2,7 @@ class CreateLabelPriorities < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
true
DOWNTIME_REASON
=
'This migration adds foreign keys'
.
freeze
DOWNTIME_REASON
=
'This migration adds foreign keys'
disable_ddl_transaction!
...
...
db/migrate/20161017125927_add_unique_index_to_labels.rb
View file @
60170927
...
...
@@ -2,7 +2,7 @@ class AddUniqueIndexToLabels < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
true
DOWNTIME_REASON
=
'This migration removes duplicated labels.'
.
freeze
DOWNTIME_REASON
=
'This migration removes duplicated labels.'
disable_ddl_transaction!
...
...
db/migrate/20161018024215_migrate_labels_priority.rb
View file @
60170927
...
...
@@ -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.'
.
freeze
DOWNTIME_REASON
=
'Prioritized labels will not work as expected until this migration is complete.'
disable_ddl_transaction!
...
...
db/migrate/20161018024550_remove_priority_from_labels.rb
View file @
60170927
...
...
@@ -2,7 +2,7 @@ class RemovePriorityFromLabels < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
true
DOWNTIME_REASON
=
'This migration removes an existing column'
.
freeze
DOWNTIME_REASON
=
'This migration removes an existing column'
disable_ddl_transaction!
...
...
db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
View file @
60170927
...
...
@@ -8,7 +8,7 @@ class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
<<-
EOF
.
freeze
DOWNTIME_REASON
=
<<-
EOF
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.
...
...
db/migrate/20161019213545_generate_project_feature_for_projects.rb
View file @
60170927
class
GenerateProjectFeatureForProjects
<
ActiveRecord
::
Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
<<-
HEREDOC
.
freeze
DOWNTIME_REASON
=
<<-
HEREDOC
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.
...
...
db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
View file @
60170927
...
...
@@ -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'
.
freeze
DOWNTIME_REASON
=
'Adding a foreign key'
# 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
...
...
db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
View file @
60170927
...
...
@@ -8,7 +8,7 @@ class MigrateMailroomQueueFromDefault < ActiveRecord::Migration
DOWNTIME
=
true
DOWNTIME_REASON
=
<<-
EOF
.
freeze
DOWNTIME_REASON
=
<<-
EOF
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.
...
...
Prev
1
2
Next
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