mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Spree init works when database has not been created, remove duplicate FK from db/schema.rb
This commit is contained in:
@@ -14,8 +14,12 @@ Spree.config do |config|
|
||||
config.checkout_zone = ENV["CHECKOUT_ZONE"]
|
||||
config.address_requires_state = true
|
||||
|
||||
country = Spree::Country.find_by_name(ENV["DEFAULT_COUNTRY"])
|
||||
config.default_country_id = country.id if country.present?
|
||||
if Spree::Country.table_exists?
|
||||
country = Spree::Country.find_by_name(ENV["DEFAULT_COUNTRY"])
|
||||
config.default_country_id = country.id if country.present?
|
||||
else
|
||||
config.default_country_id = 12 # Australia
|
||||
end
|
||||
|
||||
# -- spree_paypal_express
|
||||
# Auto-capture payments. Without this option, payments must be manually captured in the paypal interface.
|
||||
|
||||
@@ -1096,9 +1096,6 @@ ActiveRecord::Schema.define(:version => 20150225232938) do
|
||||
add_foreign_key "enterprise_groups", "spree_addresses", name: "enterprise_groups_address_id_fk", column: "address_id"
|
||||
add_foreign_key "enterprise_groups", "spree_users", name: "enterprise_groups_owner_id_fk", column: "owner_id"
|
||||
|
||||
add_foreign_key "enterprise_groups", "spree_addresses", name: "enterprise_groups_address_id_fk", column: "address_id"
|
||||
add_foreign_key "enterprise_groups", "spree_users", name: "enterprise_groups_owner_id_fk", column: "owner_id"
|
||||
|
||||
add_foreign_key "enterprise_groups_enterprises", "enterprise_groups", name: "enterprise_groups_enterprises_enterprise_group_id_fk"
|
||||
add_foreign_key "enterprise_groups_enterprises", "enterprises", name: "enterprise_groups_enterprises_enterprise_id_fk"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user