diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-24 00:36:12 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-24 00:36:12 +0300 |
commit | 4706352416005962ccb34bad1c3acc5d7479523c (patch) | |
tree | 334b873d90bf2aa98349f3812e9b1af06f89f484 /db/migrate/20190422082247_create_project_metrics_settings.rb | |
parent | b8dec7ecb43d3825f994136ca68e88aada832218 (diff) |
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/20190422082247_create_project_metrics_settings.rb')
-rw-r--r-- | db/migrate/20190422082247_create_project_metrics_settings.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20190422082247_create_project_metrics_settings.rb b/db/migrate/20190422082247_create_project_metrics_settings.rb index 3e21dd0a934..a0a2ed64820 100644 --- a/db/migrate/20190422082247_create_project_metrics_settings.rb +++ b/db/migrate/20190422082247_create_project_metrics_settings.rb @@ -7,7 +7,7 @@ class CreateProjectMetricsSettings < ActiveRecord::Migration[5.0] def change create_table :project_metrics_settings, id: :int, primary_key: :project_id, default: nil do |t| - t.string :external_dashboard_url, null: false + t.string :external_dashboard_url, null: false # rubocop:disable Migration/AddLimitToStringColumns t.foreign_key :projects, column: :project_id, on_delete: :cascade end end |