Make Active Storage update migrations reversible

This commit is contained in:
Santiago Bartesaghi 2020-05-07 23:20:16 -03:00 committed by GitHub
parent 0e35c10659
commit e61bdbf315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -10,4 +10,8 @@ class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
change_column :active_storage_blobs, :service_name, :string, null: false
end
end
def down
remove_column :active_storage_blobs, :service_name
end
end

View File

@ -1,5 +1,5 @@
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
def up
def change
create_table :active_storage_variant_records do |t|
t.belongs_to :blob, null: false, index: false
t.string :variation_digest, null: false