summaryrefslogtreecommitdiff
path: root/db/migrate/20180503131624_create_remote_mirrors.rb
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2019-08-23 21:36:12 +0000
committerStan Hu <stanhu@gmail.com>2019-08-23 21:36:12 +0000
commit4706352416005962ccb34bad1c3acc5d7479523c (patch)
tree334b873d90bf2aa98349f3812e9b1af06f89f484 /db/migrate/20180503131624_create_remote_mirrors.rb
parentb8dec7ecb43d3825f994136ca68e88aada832218 (diff)
downloadgitlab-ce-4706352416005962ccb34bad1c3acc5d7479523c.tar.gz
Adds cop to enforce string limits on migrations
This cop will analyze migrations that add columns with string, and report an offense if the string has no limit enforced Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64505
Diffstat (limited to 'db/migrate/20180503131624_create_remote_mirrors.rb')
-rw-r--r--db/migrate/20180503131624_create_remote_mirrors.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/migrate/20180503131624_create_remote_mirrors.rb b/db/migrate/20180503131624_create_remote_mirrors.rb
index 288ae365f0f..a079c1b3328 100644
--- a/db/migrate/20180503131624_create_remote_mirrors.rb
+++ b/db/migrate/20180503131624_create_remote_mirrors.rb
@@ -5,6 +5,7 @@ class CreateRemoteMirrors < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
+ # rubocop:disable Migration/AddLimitToStringColumns
def up
return if table_exists?(:remote_mirrors)
@@ -27,6 +28,7 @@ class CreateRemoteMirrors < ActiveRecord::Migration[4.2]
t.timestamps null: false
end
end
+ # rubocop:enable Migration/AddLimitToStringColumns
def down
# ee/db/migrate/20160321161032_create_remote_mirrors_ee.rb will remove the table