From ad948f0507e9ca41580592d9638eae7a244d030f Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 13 Apr 2023 18:13:54 -0600 Subject: Borra el foreign key payment en Order --- db/migrate/20230414000904_drop_foreign_key_payment_in_order.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 db/migrate/20230414000904_drop_foreign_key_payment_in_order.rb (limited to 'db/migrate') 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 -- cgit v1.2.3