Created
September 5, 2019 12:29
-
-
Save mihaic195/bf64a972f0daf455e856db756b53592f 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