Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
Co-authored-by: Ralf Pannemans <[email protected]>
  • Loading branch information
modulo11 and c0d1ngm0nk3y committed Jun 11, 2024
1 parent e50b504 commit 0c4dff2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions db/migrations/20240514113500_create_cnb_lifecycle_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

up do
# timestamps are added in VCAP::Migration.common
# rubocop:disable Rails/CreateTableWithTimestamps
create_table(:cnb_lifecycle_data) do
VCAP::Migration.common(self, :cnb_lifecycle_data)

Expand All @@ -20,15 +19,14 @@

String :stack, size: 255
end
# rubocop:enable Rails/CreateTableWithTimestamps

alter_table(:buildpack_lifecycle_buildpacks) do
add_column :cnb_lifecycle_data_guid, String, size: 255

add_foreign_key [:cnb_lifecycle_data_guid], :cnb_lifecycle_data, key: :guid, name: :fk_blcnb_bldata_guid, on_delete: :cascade
# TODO: fails with undefined 'database_type' - does not work in alter_table?
# VCAP::Migration.with_concurrent_timeout(self) do
add_index :cnb_lifecycle_data_guid, name: :bl_cnb_bldata_guid_index # , concurrently: true if database_type == :postgres
add_index :cnb_lifecycle_data_guid, name: :bl_cnb_bldata_guid_index, concurrently: true if database_type == :postgres
# end
end
end
Expand All @@ -38,7 +36,7 @@
drop_foreign_key [:cnb_lifecycle_data_guid]
# TODO: fails with undefined 'database_type' - does not work in alter_table?
# VCAP::Migration.with_concurrent_timeout(self) do
drop_index :cnb_lifecycle_data_guid, name: :bl_cnb_bldata_guid_index # , concurrently: true if database_type == :postgres
drop_index :cnb_lifecycle_data_guid, name: :bl_cnb_bldata_guid_index, concurrently: true if database_type == :postgres
# end
drop_column :cnb_lifecycle_data_guid
end
Expand Down

0 comments on commit 0c4dff2

Please sign in to comment.