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