diff options
Diffstat (limited to 'scripts/decomposition')
-rwxr-xr-x | scripts/decomposition/generate-loose-foreign-key | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/decomposition/generate-loose-foreign-key b/scripts/decomposition/generate-loose-foreign-key index 2e91aa662de..ad7d6e32aa0 100755 --- a/scripts/decomposition/generate-loose-foreign-key +++ b/scripts/decomposition/generate-loose-foreign-key @@ -164,7 +164,7 @@ def generate_migration(definition) content = <<-EOF.strip_heredoc # frozen_string_literal: true - class Remove#{definition.to_table.camelcase}#{definition.from_table.camelcase}#{definition.column.camelcase}Fk < Gitlab::Database::Migration[1.0] + class Remove#{definition.to_table.camelcase}#{definition.from_table.camelcase}#{definition.column.camelcase}Fk < Gitlab::Database::Migration[2.1] disable_ddl_transaction! def up @@ -178,7 +178,9 @@ def generate_migration(definition) end def down - add_concurrent_foreign_key(:#{definition.from_table}, :#{definition.to_table}, name: "#{definition.name}", column: :#{definition.column}, target_column: :#{definition.primary_key}, on_delete: :#{definition.on_delete}) + add_concurrent_foreign_key(:#{definition.from_table}, :#{definition.to_table}, + name: "#{definition.name}", column: :#{definition.column}, + target_column: :#{definition.primary_key}, on_delete: :#{definition.on_delete}) end end EOF |