diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20230414000904_drop_foreign_key_payment_in_order.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/db/migrate/20230414000904_drop_foreign_key_payment_in_order.rb b/db/migrate/20230414000904_drop_foreign_key_payment_in_order.rb new file mode 100644 index 0000000..bf95bed --- /dev/null +++ b/db/migrate/20230414000904_drop_foreign_key_payment_in_order.rb @@ -0,0 +1,6 @@ +class DropForeignKeyPaymentInOrder < ActiveRecord::Migration[7.0] + def change + remove_foreign_key(:orders, column: :payment_id) + change_column_null(:orders, :payment_id, true) + end +end |