summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Desantis <desa.alessandro@gmail.com>2020-09-25 13:31:18 +0200
committerAlessandro Desantis <desa.alessandro@gmail.com>2020-09-25 13:31:18 +0200
commitb4c1e0fccd009afe8d93772cb35b82a59519b231 (patch)
tree8ac8be632cb85bb61c7408feabf91a71c9ee6f2f
parent93a165c4036369e90acdbbffafb64091588866d1 (diff)
Use integer foreign keys for compatibility with old tables
-rw-r--r--db/migrate/20200917072152_add_subscription_reference_to_orders.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/db/migrate/20200917072152_add_subscription_reference_to_orders.rb b/db/migrate/20200917072152_add_subscription_reference_to_orders.rb
index dae918a..28f72a9 100644
--- a/db/migrate/20200917072152_add_subscription_reference_to_orders.rb
+++ b/db/migrate/20200917072152_add_subscription_reference_to_orders.rb
@@ -1,5 +1,8 @@
class AddSubscriptionReferenceToOrders < ActiveRecord::Migration[5.2]
def change
- add_reference :spree_orders, :subscription, null: true, foreign_key: { to_table: :solidus_subscriptions_subscriptions }
+ add_reference :spree_orders, :subscription, null: true, foreign_key: {
+ to_table: :solidus_subscriptions_subscriptions,
+ type: :integer,
+ }
end
end