From 3f4b3b8e4efa612af77ae63feccaa98f6651764a Mon Sep 17 00:00:00 2001 From: "Dominik M. Kwiatek" Date: Thu, 21 May 2020 21:32:36 +0100 Subject: [PATCH] Simplify Rename Crop Fields migration --- db/migrate/20200517190138_rename_crop_fields.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/db/migrate/20200517190138_rename_crop_fields.rb b/db/migrate/20200517190138_rename_crop_fields.rb index a9e74fbc..12e81325 100644 --- a/db/migrate/20200517190138_rename_crop_fields.rb +++ b/db/migrate/20200517190138_rename_crop_fields.rb @@ -1,5 +1,5 @@ class RenameCropFields < ActiveRecord::Migration[5.2] - def up + def change rename_column :users, :crop_h, :profile_picture_h rename_column :users, :crop_w, :profile_picture_w rename_column :users, :crop_x, :profile_picture_x @@ -9,15 +9,4 @@ class RenameCropFields < ActiveRecord::Migration[5.2] rename_column :users, :crop_h_x, :profile_header_x rename_column :users, :crop_h_y, :profile_header_y end - - def down - rename_column :users, :profile_picture_h, :crop_h - rename_column :users, :profile_picture_w, :crop_w - rename_column :users, :profile_picture_x, :crop_x - rename_column :users, :profile_picture_y, :crop_y - rename_column :users, :profile_header_h, :crop_h_h - rename_column :users, :profile_header_w, :crop_h_w - rename_column :users, :profile_header_x, :crop_h_x - rename_column :users, :profile_header_y, :crop_h_y - end end