diff options
Diffstat (limited to 'rubocop/migration_helpers.rb')
-rw-r--r-- | rubocop/migration_helpers.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rubocop/migration_helpers.rb b/rubocop/migration_helpers.rb index a987ae360d3..de377b15cc8 100644 --- a/rubocop/migration_helpers.rb +++ b/rubocop/migration_helpers.rb @@ -54,6 +54,12 @@ module RuboCop ci_builds ].freeze + # List of helpers that add new columns, either directly (ADD_COLUMN_METHODS) + # or through a create/alter table (TABLE_METHODS) + ADD_COLUMN_METHODS = %i(add_column add_column_with_default change_column_type_concurrently).freeze + + TABLE_METHODS = %i(create_table create_table_if_not_exists change_table).freeze + # Returns true if the given node originated from the db/migrate directory. def in_migration?(node) dirname(node).end_with?('db/migrate', 'db/geo/migrate') || in_post_deployment_migration?(node) |