From ea9bc3a624a19526619c7f457a7cd87e6b034226 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Thu, 31 Oct 2024 17:46:30 +0000 Subject: [PATCH] Fix lint for migration --- ...44_allow_decimal_stairbought_and_stairowned.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/db/migrate/20241031102744_allow_decimal_stairbought_and_stairowned.rb b/db/migrate/20241031102744_allow_decimal_stairbought_and_stairowned.rb index 50bdd5fd3..44154d630 100644 --- a/db/migrate/20241031102744_allow_decimal_stairbought_and_stairowned.rb +++ b/db/migrate/20241031102744_allow_decimal_stairbought_and_stairowned.rb @@ -1,6 +1,15 @@ class AllowDecimalStairboughtAndStairowned < ActiveRecord::Migration[7.0] - def change - change_column :sales_logs, :stairbought, :decimal - change_column :sales_logs, :stairowned, :decimal + def up + change_table :sales_logs, bulk: true do |t| + t.change :stairbought, :decimal + t.change :stairowned, :decimal + end + end + + def down + change_table :sales_logs, bulk: true do |t| + t.change :stairbought, :integer + t.change :stairowned, :integer + end end end