Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdanRada/64117be86f7107c4e0b56f9f60967496 to your computer and use it in GitHub Desktop.
Save bogdanRada/64117be86f7107c4e0b56f9f60967496 to your computer and use it in GitHub Desktop.
Migration to remove paperclip columns from models
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