Forked from mihaic195/20190808082353_remove_paperclip_columns_from_models.rb
Created
February 25, 2022 11:07
-
-
Save bogdanRada/64117be86f7107c4e0b56f9f60967496 to your computer and use it in GitHub Desktop.
Migration to remove paperclip columns from models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RemovePaperclipColumnsFromModels < ActiveRecord::Migration[5.2] | |
def up | |
remove_column :model, :logo_content_type | |
remove_column :model, :logo_file_name | |
remove_column :model, :logo_file_size | |
remove_column :model, :logo_fingerprint | |
remove_column :model, :logo_updated_at | |
end | |
def down | |
add_column :model, :logo_content_type, :string | |
add_column :model, :logo_file_name, :sting | |
add_column :model, :logo_file_size, :integer | |
add_column :model, :logo_fingerprint, :string | |
add_column :model, :logo_updated_at, :datetime | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment