spree_core 4.2.5 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/finders/concerns/spree/product_filterable.rb +9 -0
- data/app/finders/spree/cms_pages/find.rb +41 -0
- data/app/finders/spree/menus/find.rb +11 -0
- data/app/finders/spree/option_values/find_available.rb +20 -0
- data/app/finders/spree/orders/find_complete.rb +14 -2
- data/app/finders/spree/orders/find_current.rb +1 -13
- data/app/finders/spree/product_properties/find_available.rb +20 -0
- data/app/finders/spree/products/find.rb +80 -21
- data/app/finders/spree/stores/find_current.rb +24 -0
- data/app/finders/spree/taxons/find.rb +22 -6
- data/app/helpers/spree/base_helper.rb +69 -7
- data/app/helpers/spree/locale_helper.rb +5 -1
- data/app/helpers/spree/products_helper.rb +7 -3
- data/app/models/concerns/spree/display_link.rb +42 -0
- data/app/models/concerns/spree/display_money.rb +6 -2
- data/app/models/concerns/spree/filter_param.rb +21 -0
- data/app/models/concerns/spree/image_methods.rb +24 -0
- data/app/models/concerns/spree/memoized_data.rb +24 -0
- data/app/models/concerns/spree/multi_store_resource.rb +24 -0
- data/app/models/concerns/spree/product_scopes.rb +71 -8
- data/app/models/concerns/spree/single_store_resource.rb +19 -0
- data/app/models/concerns/spree/user_address.rb +19 -0
- data/app/models/concerns/spree/user_methods.rb +14 -12
- data/app/models/concerns/spree/user_payment_source.rb +1 -1
- data/app/models/concerns/spree/user_reporting.rb +35 -10
- data/app/models/concerns/spree/user_roles.rb +25 -0
- data/app/models/spree/ability.rb +3 -1
- data/app/models/spree/address.rb +27 -6
- data/app/models/spree/app_configuration.rb +8 -0
- data/app/models/spree/app_dependencies.rb +20 -6
- data/app/models/spree/base.rb +18 -0
- data/app/models/spree/classification.rb +3 -0
- data/app/models/spree/cms/pages/feature_page.rb +7 -0
- data/app/models/spree/cms/pages/homepage.rb +20 -0
- data/app/models/spree/cms/pages/standard_page.rb +4 -0
- data/app/models/spree/cms/sections/featured_article.rb +22 -0
- data/app/models/spree/cms/sections/hero_image.rb +38 -0
- data/app/models/spree/cms/sections/image_gallery.rb +103 -0
- data/app/models/spree/cms/sections/product_carousel.rb +14 -0
- data/app/models/spree/cms/sections/rich_text_content.rb +13 -0
- data/app/models/spree/cms/sections/side_by_side_images.rb +74 -0
- data/app/models/spree/cms_page.rb +66 -0
- data/app/models/spree/cms_section.rb +69 -0
- data/app/models/spree/country.rb +14 -6
- data/app/models/spree/credit_card.rb +2 -8
- data/app/models/spree/customer_return.rb +8 -2
- data/app/models/spree/gateway/bogus.rb +6 -4
- data/app/models/spree/icon.rb +9 -0
- data/app/models/spree/image/configuration/active_storage.rb +2 -0
- data/app/models/spree/image.rb +5 -24
- data/app/models/spree/inventory_unit.rb +1 -1
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/menu.rb +63 -0
- data/app/models/spree/menu_item.rb +76 -0
- data/app/models/spree/option_type.rb +1 -1
- data/app/models/spree/option_value.rb +11 -0
- data/app/models/spree/option_value_variant.rb +1 -1
- data/app/models/spree/order/address_book.rb +3 -5
- data/app/models/spree/order/currency_updater.rb +1 -1
- data/app/models/spree/order/emails.rb +32 -0
- data/app/models/spree/order/payments.rb +1 -1
- data/app/models/spree/order/store_credit.rb +1 -1
- data/app/models/spree/order.rb +46 -45
- data/app/models/spree/payment.rb +7 -0
- data/app/models/spree/payment_method.rb +16 -0
- data/app/models/spree/preferences/preferable.rb +12 -0
- data/app/models/spree/preferences/preferable_class_methods.rb +10 -1
- data/app/models/spree/product.rb +37 -30
- data/app/models/spree/product_property.rb +19 -4
- data/app/models/spree/promotion/rules/country.rb +1 -1
- data/app/models/spree/promotion/rules/first_order.rb +4 -3
- data/app/models/spree/promotion/rules/taxon.rb +10 -7
- data/app/models/spree/promotion.rb +6 -15
- data/app/models/spree/promotion_handler/cart.rb +7 -2
- data/app/models/spree/promotion_handler/coupon.rb +5 -4
- data/app/models/spree/promotion_handler/free_shipping.rb +5 -6
- data/app/models/spree/promotion_handler/page.rb +3 -2
- data/app/models/spree/promotion_handler/promotion_duplicator.rb +1 -0
- data/app/models/spree/promotion_rule.rb +2 -0
- data/app/models/spree/property.rb +28 -1
- data/app/models/spree/reimbursement.rb +3 -1
- data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +2 -1
- data/app/models/spree/shipment_handler.rb +4 -2
- data/app/models/spree/stock/quantifier.rb +6 -6
- data/app/models/spree/stock_location.rb +9 -0
- data/app/models/spree/store.rb +90 -7
- data/app/models/spree/store_credit.rb +7 -3
- data/app/models/spree/store_credit_event.rb +2 -2
- data/app/models/spree/store_payment_method.rb +11 -0
- data/app/models/spree/store_product.rb +11 -0
- data/app/models/spree/store_promotion.rb +11 -0
- data/app/models/spree/taxon.rb +22 -1
- data/app/models/spree/taxon_image/configuration/active_storage.rb +2 -0
- data/app/models/spree/taxon_image.rb +1 -0
- data/app/models/spree/taxonomy.rb +3 -1
- data/app/models/spree/variant.rb +21 -6
- data/app/presenters/spree/filters/options_presenter.rb +47 -0
- data/app/presenters/spree/filters/price_presenter.rb +22 -0
- data/app/presenters/spree/filters/price_range_presenter.rb +29 -0
- data/app/presenters/spree/filters/properties_presenter.rb +23 -0
- data/app/presenters/spree/filters/property_presenter.rb +42 -0
- data/app/presenters/spree/filters/quantified_price_range_presenter.rb +44 -0
- data/app/services/spree/account/addresses/create.rb +1 -0
- data/app/services/spree/account/addresses/helper.rb +6 -0
- data/app/services/spree/account/addresses/update.rb +9 -3
- data/app/services/spree/account/create.rb +17 -0
- data/app/services/spree/account/update.rb +15 -0
- data/app/services/spree/build_localized_redirect_url.rb +1 -1
- data/app/services/spree/cart/associate.rb +16 -0
- data/app/services/spree/cart/change_currency.rb +27 -0
- data/app/services/spree/cart/create.rb +5 -3
- data/app/services/spree/cart/destroy.rb +40 -0
- data/app/services/spree/cart/empty.rb +36 -0
- data/app/services/spree/cart/estimate_shipping_rates.rb +3 -3
- data/app/services/spree/checkout/add_store_credit.rb +1 -1
- data/app/services/spree/classifications/reposition.rb +18 -0
- data/app/services/spree/credit_cards/destroy.rb +41 -0
- data/app/sorters/spree/base_sorter.rb +23 -11
- data/app/sorters/spree/products/sort.rb +23 -7
- data/app/validators/db_maximum_length_validator.rb +5 -0
- data/app/validators/email_validator.rb +3 -1
- data/config/initializers/active_storage.rb +2 -0
- data/config/locales/en.yml +177 -3
- data/config/routes.rb +0 -5
- data/db/migrate/20201023152810_add_filterable_to_spree_properties.rb +8 -0
- data/db/migrate/20210407200948_create_spree_menus.rb +16 -0
- data/db/migrate/20210408092939_create_spree_menu_items.rb +31 -0
- data/db/migrate/20210504163720_add_filter_param_to_spree_product_properties.rb +8 -0
- data/db/migrate/20210505114659_add_filter_param_to_spree_properties.rb +8 -0
- data/db/migrate/20210512191732_create_spree_cms_pages.rb +24 -0
- data/db/migrate/20210514204251_create_spree_cms_sections.rb +22 -0
- data/db/migrate/20210527094055_create_spree_products_stores.rb +36 -0
- data/db/migrate/20210608045519_ensure_store_default_country_is_set.rb +5 -0
- data/db/migrate/20210702112334_add_missing_timestamp_columns.rb +46 -0
- data/db/migrate/20210713131614_add_unique_index_on_property_id_and_product_id_to_product_properties.rb +29 -0
- data/db/migrate/20210715091956_add_store_id_to_spree_store_credits.rb +10 -0
- data/db/migrate/20210716093151_add_store_id_to_spree_taxonomies.rb +11 -0
- data/db/migrate/20210716104141_add_index_on_name_parent_id_and_taxonomy_id_on_spree_taxons.rb +31 -0
- data/db/migrate/20210721120857_add_index_on_permalink_parent_id_and_taxonomy_id_on_spree_taxons.rb +31 -0
- data/db/migrate/20210721125657_create_spree_promotions_stores.rb +29 -0
- data/db/migrate/20210722090705_add_store_id_to_spree_customer_returns.rb +11 -0
- data/db/migrate/20210726065456_change_integer_id_columns_into_bigint.rb +305 -0
- data/db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb +9 -0
- data/lib/generators/spree/dummy/dummy_generator.rb +11 -6
- data/lib/generators/spree/dummy/templates/rails/test.rb +2 -0
- data/lib/generators/spree/dummy_model/templates/model.rb.tt +1 -1
- data/lib/generators/spree/install/install_generator.rb +12 -24
- data/lib/spree/core/components.rb +8 -0
- data/lib/spree/core/controller_helpers/auth.rb +7 -1
- data/lib/spree/core/controller_helpers/common.rb +1 -1
- data/lib/spree/core/controller_helpers/order.rb +4 -4
- data/lib/spree/core/controller_helpers/search.rb +1 -0
- data/lib/spree/core/controller_helpers/store.rb +24 -1
- data/lib/spree/core/engine.rb +6 -0
- data/lib/spree/core/importer/product.rb +3 -1
- data/lib/spree/core/product_duplicator.rb +1 -0
- data/lib/spree/core/search/base.rb +17 -22
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core.rb +8 -4
- data/lib/spree/i18n.rb +1 -1
- data/lib/spree/money.rb +2 -1
- data/lib/spree/permitted_attributes.rb +21 -3
- data/lib/spree/testing_support/authorization_helpers.rb +6 -3
- data/lib/spree/testing_support/capybara_config.rb +3 -1
- data/lib/spree/testing_support/common_rake.rb +17 -4
- data/lib/spree/testing_support/extension_rake.rb +2 -2
- data/lib/spree/testing_support/factories/address_factory.rb +1 -1
- data/lib/spree/testing_support/factories/classification_factory.rb +8 -0
- data/lib/spree/testing_support/factories/cms_page_factory.rb +20 -0
- data/lib/spree/testing_support/factories/cms_section_factory.rb +31 -0
- data/lib/spree/testing_support/factories/customer_return_factory.rb +24 -17
- data/lib/spree/testing_support/factories/icon_factory.rb +7 -0
- data/lib/spree/testing_support/factories/line_item_factory.rb +6 -2
- data/lib/spree/testing_support/factories/menu_factory.rb +16 -0
- data/lib/spree/testing_support/factories/menu_item_factory.rb +10 -0
- data/lib/spree/testing_support/factories/options_factory.rb +5 -0
- data/lib/spree/testing_support/factories/order_factory.rb +11 -2
- data/lib/spree/testing_support/factories/payment_method_factory.rb +6 -2
- data/lib/spree/testing_support/factories/product_factory.rb +17 -1
- data/lib/spree/testing_support/factories/product_property_factory.rb +1 -1
- data/lib/spree/testing_support/factories/promotion_factory.rb +18 -9
- data/lib/spree/testing_support/factories/property_factory.rb +22 -0
- data/lib/spree/testing_support/factories/stock_location_factory.rb +5 -4
- data/lib/spree/testing_support/factories/store_credit_factory.rb +1 -0
- data/lib/spree/testing_support/factories/store_factory.rb +11 -0
- data/lib/spree/testing_support/factories/taxon_factory.rb +3 -1
- data/lib/spree/testing_support/factories/taxon_image_factory.rb +7 -0
- data/lib/spree/testing_support/factories/taxonomy_factory.rb +1 -0
- data/lib/spree/testing_support/factories/user_factory.rb +7 -2
- data/lib/spree/testing_support/factories/variant_factory.rb +2 -2
- data/lib/spree/testing_support/flatpickr_capybara.rb +58 -35
- data/lib/spree/testing_support/locale_helpers.rb +1 -1
- data/lib/spree/testing_support/order_walkthrough.rb +9 -9
- data/lib/spree/testing_support/rspec_retry_config.rb +5 -0
- data/lib/tasks/core.rake +1 -1
- data/spec/fixtures/favicon.ico +0 -0
- data/spec/fixtures/files/icon_256x256.gif +0 -0
- data/spec/fixtures/files/icon_256x256.png +0 -0
- data/spec/fixtures/files/icon_512x512.png +0 -0
- data/spec/fixtures/files/img_256x128.png +0 -0
- data/spree_core.gemspec +12 -11
- metadata +211 -159
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree.js +0 -78
- data/app/controllers/spree/errors_controller.rb +0 -11
- data/app/helpers/spree/mail_helper.rb +0 -29
- data/app/mailers/spree/base_mailer.rb +0 -46
- data/app/mailers/spree/order_mailer.rb +0 -26
- data/app/mailers/spree/reimbursement_mailer.rb +0 -12
- data/app/mailers/spree/shipment_mailer.rb +0 -12
- data/app/mailers/spree/test_mailer.rb +0 -8
- data/app/models/spree/validations/db_maximum_length_validator.rb +0 -22
- data/app/views/layouts/spree/base_mailer.html.erb +0 -46
- data/app/views/spree/errors/forbidden.html.erb +0 -0
- data/app/views/spree/errors/unauthorized.html.erb +0 -0
- data/app/views/spree/order_mailer/cancel_email.html.erb +0 -24
- data/app/views/spree/order_mailer/cancel_email.text.erb +0 -38
- data/app/views/spree/order_mailer/confirm_email.html.erb +0 -23
- data/app/views/spree/order_mailer/confirm_email.text.erb +0 -39
- data/app/views/spree/order_mailer/store_owner_notification_email.html.erb +0 -23
- data/app/views/spree/order_mailer/store_owner_notification_email.text.erb +0 -38
- data/app/views/spree/reimbursement_mailer/reimbursement_email.html.erb +0 -56
- data/app/views/spree/reimbursement_mailer/reimbursement_email.text.erb +0 -24
- data/app/views/spree/shared/_base_mailer_footer.html.erb +0 -12
- data/app/views/spree/shared/_base_mailer_header.html.erb +0 -13
- data/app/views/spree/shared/_base_mailer_stylesheets.html.erb +0 -456
- data/app/views/spree/shared/_error_messages.html.erb +0 -11
- data/app/views/spree/shared/_mailer_line_item.html.erb +0 -16
- data/app/views/spree/shared/_paths.html.erb +0 -8
- data/app/views/spree/shared/_purchased_items_table.html.erb +0 -69
- data/app/views/spree/shared/purchased_items_table/_adjustment.html.erb +0 -13
- data/app/views/spree/shared/purchased_items_table/_line_item.html.erb +0 -27
- data/app/views/spree/shared/purchased_items_table/_subtotal.html.erb +0 -13
- data/app/views/spree/shared/purchased_items_table/_total.html.erb +0 -13
- data/app/views/spree/shipment_mailer/shipped_email.html.erb +0 -36
- data/app/views/spree/shipment_mailer/shipped_email.text.erb +0 -17
- data/app/views/spree/test_mailer/test_email.html.erb +0 -40
- data/app/views/spree/test_mailer/test_email.text.erb +0 -4
- data/config/initializers/assets.rb +0 -2
- data/config/initializers/premailer_assets.rb +0 -1
- data/config/initializers/premailer_rails.rb +0 -3
- data/db/migrate/20140805171219_make_existing_credit_cards_default.rb +0 -10
- data/lib/generators/spree/dummy/templates/initializers/bullet.rb +0 -5
- data/lib/generators/spree/install/templates/vendor/assets/javascripts/spree/backend/all.js +0 -15
- data/lib/generators/spree/install/templates/vendor/assets/javascripts/spree/frontend/all.js +0 -16
- data/lib/generators/spree/install/templates/vendor/assets/stylesheets/spree/backend/all.css +0 -16
- data/lib/generators/spree/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +0 -16
- data/lib/generators/spree/mailers_preview/mailers_preview_generator.rb +0 -23
- data/lib/generators/spree/mailers_preview/templates/mailers/previews/order_preview.rb +0 -13
- data/lib/generators/spree/mailers_preview/templates/mailers/previews/reimbursement_preview.rb +0 -5
- data/lib/generators/spree/mailers_preview/templates/mailers/previews/shipment_preview.rb +0 -5
- data/lib/generators/spree/mailers_preview/templates/mailers/previews/user_preview.rb +0 -11
- data/lib/tasks/email.rake +0 -10
- data/vendor/assets/javascripts/cleave.js +0 -1669
- data/vendor/assets/javascripts/fetch.umd.js +0 -531
- data/vendor/assets/javascripts/jquery.payment.js +0 -652
- data/vendor/assets/javascripts/jsuri.js +0 -458
- data/vendor/assets/javascripts/polyfill.min.js +0 -1
data/config/routes.rb
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddFilterableToSpreeProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
unless column_exists?(:spree_properties, :filterable)
|
4
|
+
add_column :spree_properties, :filterable, :boolean, default: false, null: false
|
5
|
+
add_index :spree_properties, :filterable
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateSpreeMenus < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :spree_menus do |t|
|
4
|
+
t.column :name, :string
|
5
|
+
t.column :location, :string
|
6
|
+
t.column :locale, :string
|
7
|
+
|
8
|
+
t.belongs_to :store
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index :spree_menus, :locale
|
14
|
+
add_index :spree_menus, [:store_id, :location, :locale], unique: true
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class CreateSpreeMenuItems < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :spree_menu_items do |t|
|
4
|
+
t.column :name, :string, null: false
|
5
|
+
t.column :subtitle, :string
|
6
|
+
t.column :destination, :string
|
7
|
+
t.column :new_window, :boolean, default: false
|
8
|
+
t.column :item_type, :string
|
9
|
+
t.column :linked_resource_type, :string, default: 'URL'
|
10
|
+
t.column :linked_resource_id, :integer
|
11
|
+
t.column :code, :string
|
12
|
+
|
13
|
+
t.column :parent_id, :integer
|
14
|
+
t.column :lft, :integer, null: false
|
15
|
+
t.column :rgt, :integer, null: false
|
16
|
+
t.column :depth, :integer, null: false, default: 0
|
17
|
+
|
18
|
+
t.belongs_to :menu
|
19
|
+
|
20
|
+
t.timestamps
|
21
|
+
end
|
22
|
+
|
23
|
+
add_index :spree_menu_items, :lft
|
24
|
+
add_index :spree_menu_items, :rgt
|
25
|
+
add_index :spree_menu_items, :depth
|
26
|
+
add_index :spree_menu_items, :parent_id
|
27
|
+
add_index :spree_menu_items, :item_type
|
28
|
+
add_index :spree_menu_items, :code
|
29
|
+
add_index :spree_menu_items, [:linked_resource_type, :linked_resource_id], name: 'index_spree_menu_items_on_linked_resource'
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddFilterParamToSpreeProductProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
unless column_exists?(:spree_product_properties, :filter_param)
|
4
|
+
add_column :spree_product_properties, :filter_param, :string
|
5
|
+
add_index :spree_product_properties, :filter_param
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class CreateSpreeCmsPages < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :spree_cms_pages do |t|
|
4
|
+
t.column :title, :string, null: false
|
5
|
+
t.column :meta_title, :string
|
6
|
+
t.column :content, :text
|
7
|
+
t.column :meta_description, :text
|
8
|
+
t.column :visible, :boolean, default: true, index: true
|
9
|
+
t.column :slug, :string
|
10
|
+
t.column :type, :string
|
11
|
+
t.column :locale, :string
|
12
|
+
t.column :deleted_at, :datetime, index: true
|
13
|
+
|
14
|
+
t.belongs_to :store
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
|
19
|
+
add_index :spree_cms_pages, [:slug, :store_id], unique: true
|
20
|
+
add_index :spree_cms_pages, [:slug, :store_id, :deleted_at]
|
21
|
+
add_index :spree_cms_pages, [:title, :type, :store_id]
|
22
|
+
add_index :spree_cms_pages, [:store_id, :locale, :type]
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class CreateSpreeCmsSections < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :spree_cms_sections do |t|
|
4
|
+
t.column :name, :string, null: false
|
5
|
+
t.column :content, :text
|
6
|
+
t.column :settings, :text
|
7
|
+
t.column :fit, :string
|
8
|
+
t.column :destination, :string
|
9
|
+
t.column :type, :string
|
10
|
+
t.column :position, :integer
|
11
|
+
|
12
|
+
t.references :linked_resource, polymorphic: true, index: { name: 'index_spree_cms_sections_on_linked_resource' }
|
13
|
+
|
14
|
+
t.belongs_to :cms_page
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
|
19
|
+
add_index :spree_cms_sections, :type
|
20
|
+
add_index :spree_cms_sections, :position
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class CreateSpreeProductsStores < ActiveRecord::Migration[5.2]
|
2
|
+
def up
|
3
|
+
if table_exists?(:spree_products_stores)
|
4
|
+
unless index_exists?(:spree_products_stores, [:product_id, :store_id], unique: true)
|
5
|
+
add_index :spree_products_stores, [:product_id, :store_id], unique: true
|
6
|
+
end
|
7
|
+
unless column_exists?(:spree_products_stores, :created_at)
|
8
|
+
add_timestamps :spree_products_stores
|
9
|
+
end
|
10
|
+
else
|
11
|
+
create_table :spree_products_stores do |t|
|
12
|
+
t.references :product, index: true
|
13
|
+
t.references :store, index: true
|
14
|
+
t.timestamps
|
15
|
+
|
16
|
+
t.index [:product_id, :store_id], unique: true
|
17
|
+
end
|
18
|
+
|
19
|
+
stores = Spree::Store.all
|
20
|
+
product_ids = Spree::Product.with_deleted.order(:id).ids
|
21
|
+
|
22
|
+
if product_ids.any? && Spree::StoreProduct.respond_to?(:insert_all)
|
23
|
+
stores.find_each do |store|
|
24
|
+
records = product_ids.map { |product_id| { product_id: product_id, store_id: store.id } }
|
25
|
+
|
26
|
+
# Rails 5 does not have insert_all
|
27
|
+
Spree::StoreProduct.insert_all(records)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def down
|
34
|
+
drop_table :spree_products_stores
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class AddMissingTimestampColumns < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
# Add missing created_at columns
|
4
|
+
%i[
|
5
|
+
spree_countries
|
6
|
+
spree_option_type_prototypes
|
7
|
+
spree_option_value_variants
|
8
|
+
spree_order_promotions
|
9
|
+
spree_product_promotion_rules
|
10
|
+
spree_products_taxons
|
11
|
+
spree_promotion_action_line_items
|
12
|
+
spree_promotion_actions
|
13
|
+
spree_promotion_rule_taxons
|
14
|
+
spree_promotion_rule_users
|
15
|
+
spree_property_prototypes
|
16
|
+
spree_prototype_taxons
|
17
|
+
spree_reimbursement_credits
|
18
|
+
spree_role_users
|
19
|
+
spree_roles
|
20
|
+
spree_shipping_method_zones
|
21
|
+
spree_states
|
22
|
+
].each do |table|
|
23
|
+
add_column table, :created_at, :datetime unless column_exists?(table, :created_at)
|
24
|
+
end
|
25
|
+
# Add missing updated_at columns
|
26
|
+
%i[
|
27
|
+
spree_option_type_prototypes
|
28
|
+
spree_option_value_variants
|
29
|
+
spree_order_promotions
|
30
|
+
spree_product_promotion_rules
|
31
|
+
spree_products_taxons
|
32
|
+
spree_promotion_action_line_items
|
33
|
+
spree_promotion_actions
|
34
|
+
spree_promotion_rule_taxons
|
35
|
+
spree_promotion_rule_users
|
36
|
+
spree_property_prototypes
|
37
|
+
spree_prototype_taxons
|
38
|
+
spree_reimbursement_credits
|
39
|
+
spree_role_users
|
40
|
+
spree_roles
|
41
|
+
spree_shipping_method_zones
|
42
|
+
].each do |table|
|
43
|
+
add_column table, :updated_at, :datetime unless column_exists?(table, :updated_at)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class AddUniqueIndexOnPropertyIdAndProductIdToProductProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def up
|
3
|
+
klass = Spree::ProductProperty
|
4
|
+
columns = %w[property_id product_id]
|
5
|
+
|
6
|
+
unless index_exists?(klass.table_name, columns)
|
7
|
+
scope = klass.unscoped
|
8
|
+
|
9
|
+
say "Find duplicate #{klass} records"
|
10
|
+
duplicates = scope.
|
11
|
+
select((columns + %w[COUNT(*)]).join(',')).
|
12
|
+
group("#{columns.join(',')}").
|
13
|
+
having('COUNT(*) > 1').
|
14
|
+
map { |row| row.attributes.slice(*columns) }
|
15
|
+
|
16
|
+
say "Delete all but the oldest duplicate #{klass} record"
|
17
|
+
duplicates.each do |conditions|
|
18
|
+
scope.where(conditions).order(:created_at).drop(1).each(&:destroy)
|
19
|
+
end
|
20
|
+
|
21
|
+
say "Add unique index to #{klass.table_name} for #{columns.inspect}"
|
22
|
+
add_index klass.table_name, columns, unique: true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def down
|
27
|
+
remove_index :spree_product_properties, [:property_id, :product_id]
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class AddStoreIdToSpreeStoreCredits < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
unless column_exists?(:spree_store_credits, :store_id)
|
4
|
+
add_column :spree_store_credits, :store_id, :bigint
|
5
|
+
add_index :spree_store_credits, :store_id
|
6
|
+
Spree::StoreCredit.reset_column_information
|
7
|
+
Spree::StoreCredit.update_all(store_id: Spree::Store.default.id)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddStoreIdToSpreeTaxonomies < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
unless column_exists?(:spree_taxonomies, :store_id)
|
4
|
+
add_column :spree_taxonomies, :store_id, :bigint
|
5
|
+
add_index :spree_taxonomies, :store_id
|
6
|
+
add_index :spree_taxonomies, [:name, :store_id], unique: true
|
7
|
+
Spree::Taxonomy.reset_column_information
|
8
|
+
Spree::Taxonomy.update_all(store_id: Spree::Store.default.id)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class AddIndexOnNameParentIdAndTaxonomyIdOnSpreeTaxons < ActiveRecord::Migration[5.2]
|
2
|
+
def up
|
3
|
+
klass = Spree::Taxon
|
4
|
+
columns = %w[name parent_id taxonomy_id]
|
5
|
+
|
6
|
+
unless index_exists?(klass.table_name, columns)
|
7
|
+
remove_index klass.table_name, columns if index_exists?(klass.table_name, columns)
|
8
|
+
|
9
|
+
say "Find duplicate #{klass} records"
|
10
|
+
duplicates = klass.
|
11
|
+
select((columns + %w[COUNT(*)]).join(',')).
|
12
|
+
group("#{columns.join(',')}").
|
13
|
+
having('COUNT(*) > 1').
|
14
|
+
map { |row| row.attributes.slice(*columns) }
|
15
|
+
|
16
|
+
say "Delete all but the oldest duplicate #{klass} record"
|
17
|
+
duplicates.each do |conditions|
|
18
|
+
klass.where(conditions).order(:created_at).drop(1).each(&:destroy)
|
19
|
+
end
|
20
|
+
|
21
|
+
duplicates.each do |conditions| puts klass.where(conditions).order(:created_at).drop(1) end
|
22
|
+
|
23
|
+
say "Add unique index to #{klass.table_name} for #{columns.inspect}"
|
24
|
+
add_index klass.table_name, columns, unique: true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def down
|
29
|
+
remove_index :spree_taxons, [:name, :parent_id, :taxonomy_id]
|
30
|
+
end
|
31
|
+
end
|
data/db/migrate/20210721120857_add_index_on_permalink_parent_id_and_taxonomy_id_on_spree_taxons.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
class AddIndexOnPermalinkParentIdAndTaxonomyIdOnSpreeTaxons < ActiveRecord::Migration[5.2]
|
2
|
+
def up
|
3
|
+
klass = Spree::Taxon
|
4
|
+
columns = %w[permalink parent_id taxonomy_id]
|
5
|
+
|
6
|
+
unless index_exists?(klass.table_name, columns)
|
7
|
+
remove_index klass.table_name, columns if index_exists?(klass.table_name, columns)
|
8
|
+
|
9
|
+
say "Find duplicate #{klass} records"
|
10
|
+
duplicates = klass.
|
11
|
+
select((columns + %w[COUNT(*)]).join(',')).
|
12
|
+
group("#{columns.join(',')}").
|
13
|
+
having('COUNT(*) > 1').
|
14
|
+
map { |row| row.attributes.slice(*columns) }
|
15
|
+
|
16
|
+
say "Delete all but the oldest duplicate #{klass} record"
|
17
|
+
duplicates.each do |conditions|
|
18
|
+
klass.where(conditions).order(:created_at).drop(1).each(&:destroy)
|
19
|
+
end
|
20
|
+
|
21
|
+
duplicates.each do |conditions| puts klass.where(conditions).order(:created_at).drop(1) end
|
22
|
+
|
23
|
+
say "Add unique index to #{klass.table_name} for #{columns.inspect}"
|
24
|
+
add_index klass.table_name, columns, unique: true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def down
|
29
|
+
remove_index :spree_taxons, [:permalink, :parent_id, :taxonomy_id]
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class CreateSpreePromotionsStores < ActiveRecord::Migration[5.2]
|
2
|
+
def up
|
3
|
+
unless table_exists?(:spree_promotions_stores)
|
4
|
+
create_table :spree_promotions_stores do |t|
|
5
|
+
t.references :promotion, index: true
|
6
|
+
t.references :store, index: true
|
7
|
+
t.timestamps
|
8
|
+
|
9
|
+
t.index [:promotion_id, :store_id], unique: true
|
10
|
+
end
|
11
|
+
|
12
|
+
stores = Spree::Store.all
|
13
|
+
promotion_ids = Spree::Promotion.order(:id).ids
|
14
|
+
|
15
|
+
stores.find_each do |store|
|
16
|
+
prepared_values = promotion_ids.map { |id| "(#{id}, #{store.id}, '#{Time.current.to_s(:db)}', '#{Time.current.to_s(:db)}')" }.join(', ')
|
17
|
+
next if prepared_values.empty?
|
18
|
+
|
19
|
+
begin
|
20
|
+
execute "INSERT INTO spree_promotions_stores (promotion_id, store_id, created_at, updated_at) VALUES #{prepared_values};"
|
21
|
+
rescue ActiveRecord::RecordNotUnique; end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def down
|
27
|
+
drop_table :spree_promotions_stores
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddStoreIdToSpreeCustomerReturns < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
unless column_exists?(:spree_customer_returns, :store_id)
|
4
|
+
add_column :spree_customer_returns, :store_id, :bigint
|
5
|
+
add_index :spree_customer_returns, :store_id
|
6
|
+
Spree::CustomerReturn.reset_column_information
|
7
|
+
default_store_id = Spree::Store.default.id
|
8
|
+
Spree::CustomerReturn.find_each { |cr| cr.update_column(:store_id, cr.order&.store_id || default_store_id) }
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,305 @@
|
|
1
|
+
class ChangeIntegerIdColumnsIntoBigint < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
change_table(:active_storage_attachments) do |t|
|
4
|
+
t.change :record_id, :bigint
|
5
|
+
t.change :blob_id, :bigint
|
6
|
+
end
|
7
|
+
|
8
|
+
change_column :friendly_id_slugs, :sluggable_id, :bigint
|
9
|
+
|
10
|
+
change_table(:spree_addresses) do |t|
|
11
|
+
t.change :state_id, :bigint
|
12
|
+
t.change :country_id, :bigint
|
13
|
+
t.change :user_id, :bigint
|
14
|
+
end
|
15
|
+
|
16
|
+
change_table(:spree_adjustments) do |t|
|
17
|
+
t.change :source_id, :bigint
|
18
|
+
t.change :adjustable_id, :bigint
|
19
|
+
t.change :order_id, :bigint
|
20
|
+
end
|
21
|
+
|
22
|
+
change_column :spree_assets, :viewable_id, :bigint
|
23
|
+
|
24
|
+
change_column :spree_calculators, :calculable_id, :bigint
|
25
|
+
|
26
|
+
change_table(:spree_credit_cards) do |t|
|
27
|
+
t.change :address_id, :bigint
|
28
|
+
t.change :user_id, :bigint
|
29
|
+
t.change :payment_method_id, :bigint
|
30
|
+
end
|
31
|
+
|
32
|
+
change_column :spree_customer_returns, :stock_location_id, :bigint
|
33
|
+
|
34
|
+
change_table(:spree_inventory_units) do |t|
|
35
|
+
t.change :variant_id, :bigint
|
36
|
+
t.change :order_id, :bigint
|
37
|
+
t.change :shipment_id, :bigint
|
38
|
+
t.change :line_item_id, :bigint
|
39
|
+
t.change :original_return_item_id, :bigint
|
40
|
+
end
|
41
|
+
|
42
|
+
change_table(:spree_line_items) do |t|
|
43
|
+
t.change :variant_id, :bigint
|
44
|
+
t.change :order_id, :bigint
|
45
|
+
t.change :tax_category_id, :bigint
|
46
|
+
end
|
47
|
+
|
48
|
+
change_column :spree_log_entries, :source_id, :bigint
|
49
|
+
|
50
|
+
change_table(:spree_menu_items) do |t|
|
51
|
+
t.change :linked_resource_id, :bigint
|
52
|
+
t.change :parent_id, :bigint
|
53
|
+
t.change :lft, :bigint
|
54
|
+
t.change :rgt, :bigint
|
55
|
+
t.change :menu_id, :bigint
|
56
|
+
end
|
57
|
+
|
58
|
+
change_column :spree_menus, :store_id, :bigint
|
59
|
+
|
60
|
+
change_table(:spree_option_type_prototypes) do |t|
|
61
|
+
t.change :prototype_id, :bigint
|
62
|
+
t.change :option_type_id, :bigint
|
63
|
+
end
|
64
|
+
|
65
|
+
change_table(:spree_option_value_variants) do |t|
|
66
|
+
t.change :variant_id, :bigint
|
67
|
+
t.change :option_value_id, :bigint
|
68
|
+
end
|
69
|
+
|
70
|
+
change_column :spree_option_values, :option_type_id, :bigint
|
71
|
+
|
72
|
+
change_table(:spree_order_promotions) do |t|
|
73
|
+
t.change :order_id, :bigint
|
74
|
+
t.change :promotion_id, :bigint
|
75
|
+
end
|
76
|
+
|
77
|
+
change_table(:spree_orders) do |t|
|
78
|
+
t.change :user_id, :bigint
|
79
|
+
t.change :bill_address_id, :bigint
|
80
|
+
t.change :ship_address_id, :bigint
|
81
|
+
t.change :created_by_id, :bigint
|
82
|
+
t.change :approver_id, :bigint
|
83
|
+
t.change :canceler_id, :bigint
|
84
|
+
t.change :store_id, :bigint
|
85
|
+
end
|
86
|
+
|
87
|
+
change_column :spree_payment_capture_events, :payment_id, :bigint
|
88
|
+
|
89
|
+
change_table(:spree_payment_methods_stores) do |t|
|
90
|
+
t.change :payment_method_id, :bigint
|
91
|
+
t.change :store_id, :bigint
|
92
|
+
end
|
93
|
+
|
94
|
+
change_table(:spree_payments) do |t|
|
95
|
+
t.change :order_id, :bigint
|
96
|
+
t.change :source_id, :bigint
|
97
|
+
t.change :payment_method_id, :bigint
|
98
|
+
end
|
99
|
+
|
100
|
+
change_column :spree_prices, :variant_id, :bigint
|
101
|
+
|
102
|
+
change_table(:spree_product_option_types) do |t|
|
103
|
+
t.change :product_id, :bigint
|
104
|
+
t.change :option_type_id, :bigint
|
105
|
+
end
|
106
|
+
|
107
|
+
change_table(:spree_product_promotion_rules) do |t|
|
108
|
+
t.change :product_id, :bigint
|
109
|
+
t.change :promotion_rule_id, :bigint
|
110
|
+
end
|
111
|
+
|
112
|
+
change_table(:spree_product_properties) do |t|
|
113
|
+
t.change :product_id, :bigint
|
114
|
+
t.change :property_id, :bigint
|
115
|
+
end
|
116
|
+
|
117
|
+
change_table(:spree_products) do |t|
|
118
|
+
t.change :tax_category_id, :bigint
|
119
|
+
t.change :shipping_category_id, :bigint
|
120
|
+
end
|
121
|
+
|
122
|
+
change_table(:spree_products_stores) do |t|
|
123
|
+
t.change :product_id, :bigint
|
124
|
+
t.change :store_id, :bigint
|
125
|
+
end
|
126
|
+
|
127
|
+
change_table(:spree_products_taxons) do |t|
|
128
|
+
t.change :product_id, :bigint
|
129
|
+
t.change :taxon_id, :bigint
|
130
|
+
end
|
131
|
+
|
132
|
+
change_table(:spree_promotion_action_line_items) do |t|
|
133
|
+
t.change :promotion_action_id, :bigint
|
134
|
+
t.change :variant_id, :bigint
|
135
|
+
end
|
136
|
+
|
137
|
+
change_column :spree_promotion_actions, :promotion_id, :bigint
|
138
|
+
|
139
|
+
change_table(:spree_promotion_rule_taxons) do |t|
|
140
|
+
t.change :taxon_id, :bigint
|
141
|
+
t.change :promotion_rule_id, :bigint
|
142
|
+
end
|
143
|
+
|
144
|
+
change_table(:spree_promotion_rule_users) do |t|
|
145
|
+
t.change :user_id, :bigint
|
146
|
+
t.change :promotion_rule_id, :bigint
|
147
|
+
end
|
148
|
+
|
149
|
+
change_table(:spree_promotion_rules) do |t|
|
150
|
+
t.change :promotion_id, :bigint
|
151
|
+
t.change :user_id, :bigint
|
152
|
+
t.change :product_group_id, :bigint
|
153
|
+
end
|
154
|
+
|
155
|
+
change_column :spree_promotions, :promotion_category_id, :bigint
|
156
|
+
|
157
|
+
change_table(:spree_promotions_stores) do |t|
|
158
|
+
t.change :promotion_id, :bigint
|
159
|
+
t.change :store_id, :bigint
|
160
|
+
end
|
161
|
+
|
162
|
+
change_table(:spree_property_prototypes) do |t|
|
163
|
+
t.change :prototype_id, :bigint
|
164
|
+
t.change :property_id, :bigint
|
165
|
+
end
|
166
|
+
|
167
|
+
change_table(:spree_prototype_taxons) do |t|
|
168
|
+
t.change :taxon_id, :bigint
|
169
|
+
t.change :prototype_id, :bigint
|
170
|
+
end
|
171
|
+
|
172
|
+
change_table(:spree_refunds) do |t|
|
173
|
+
t.change :payment_id, :bigint
|
174
|
+
t.change :refund_reason_id, :bigint
|
175
|
+
t.change :reimbursement_id, :bigint
|
176
|
+
end
|
177
|
+
|
178
|
+
change_table(:spree_reimbursement_credits) do |t|
|
179
|
+
t.change :reimbursement_id, :bigint
|
180
|
+
t.change :creditable_id, :bigint
|
181
|
+
end
|
182
|
+
|
183
|
+
change_table(:spree_reimbursements) do |t|
|
184
|
+
t.change :customer_return_id, :bigint
|
185
|
+
t.change :order_id, :bigint
|
186
|
+
end
|
187
|
+
|
188
|
+
change_table(:spree_return_authorizations) do |t|
|
189
|
+
t.change :order_id, :bigint
|
190
|
+
t.change :stock_location_id, :bigint
|
191
|
+
t.change :return_authorization_reason_id, :bigint
|
192
|
+
end
|
193
|
+
|
194
|
+
change_table(:spree_return_items) do |t|
|
195
|
+
t.change :return_authorization_id, :bigint
|
196
|
+
t.change :inventory_unit_id, :bigint
|
197
|
+
t.change :exchange_variant_id, :bigint
|
198
|
+
t.change :customer_return_id, :bigint
|
199
|
+
t.change :reimbursement_id, :bigint
|
200
|
+
t.change :preferred_reimbursement_type_id, :bigint
|
201
|
+
t.change :override_reimbursement_type_id, :bigint
|
202
|
+
end
|
203
|
+
|
204
|
+
change_table(:spree_role_users) do |t|
|
205
|
+
t.change :role_id, :bigint
|
206
|
+
t.change :user_id, :bigint
|
207
|
+
end
|
208
|
+
|
209
|
+
change_table(:spree_shipments) do |t|
|
210
|
+
t.change :order_id, :bigint
|
211
|
+
t.change :address_id, :bigint
|
212
|
+
t.change :stock_location_id, :bigint
|
213
|
+
end
|
214
|
+
|
215
|
+
change_table(:spree_shipping_method_categories) do |t|
|
216
|
+
t.change :shipping_method_id, :bigint
|
217
|
+
t.change :shipping_category_id, :bigint
|
218
|
+
end
|
219
|
+
|
220
|
+
change_table(:spree_shipping_method_zones) do |t|
|
221
|
+
t.change :shipping_method_id, :bigint
|
222
|
+
t.change :zone_id, :bigint
|
223
|
+
end
|
224
|
+
|
225
|
+
change_column :spree_shipping_methods, :tax_category_id, :bigint
|
226
|
+
|
227
|
+
change_table(:spree_shipping_rates) do |t|
|
228
|
+
t.change :shipment_id, :bigint
|
229
|
+
t.change :shipping_method_id, :bigint
|
230
|
+
t.change :tax_rate_id, :bigint
|
231
|
+
end
|
232
|
+
|
233
|
+
change_table(:spree_state_changes) do |t|
|
234
|
+
t.change :stateful_id, :bigint
|
235
|
+
t.change :user_id, :bigint
|
236
|
+
end
|
237
|
+
|
238
|
+
change_column :spree_states, :country_id, :bigint
|
239
|
+
|
240
|
+
change_table(:spree_stock_items) do |t|
|
241
|
+
t.change :stock_location_id, :bigint
|
242
|
+
t.change :variant_id, :bigint
|
243
|
+
end
|
244
|
+
|
245
|
+
change_table(:spree_stock_locations) do |t|
|
246
|
+
t.change :state_id, :bigint
|
247
|
+
t.change :country_id, :bigint
|
248
|
+
end
|
249
|
+
|
250
|
+
change_table(:spree_stock_movements) do |t|
|
251
|
+
t.change :stock_item_id, :bigint
|
252
|
+
t.change :originator_id, :bigint
|
253
|
+
end
|
254
|
+
|
255
|
+
change_table(:spree_stock_transfers) do |t|
|
256
|
+
t.change :source_location_id, :bigint
|
257
|
+
t.change :destination_location_id, :bigint
|
258
|
+
end
|
259
|
+
|
260
|
+
change_table(:spree_store_credit_events) do |t|
|
261
|
+
t.change :store_credit_id, :bigint
|
262
|
+
t.change :originator_id, :bigint
|
263
|
+
end
|
264
|
+
|
265
|
+
change_table(:spree_store_credits) do |t|
|
266
|
+
t.change :user_id, :bigint
|
267
|
+
t.change :category_id, :bigint
|
268
|
+
t.change :created_by_id, :bigint
|
269
|
+
t.change :originator_id, :bigint
|
270
|
+
t.change :type_id, :bigint
|
271
|
+
end
|
272
|
+
|
273
|
+
change_table(:spree_stores) do |t|
|
274
|
+
t.change :default_country_id, :bigint
|
275
|
+
t.change :checkout_zone_id, :bigint
|
276
|
+
end
|
277
|
+
|
278
|
+
change_table(:spree_tax_rates) do |t|
|
279
|
+
t.change :zone_id, :bigint
|
280
|
+
t.change :tax_category_id, :bigint
|
281
|
+
end
|
282
|
+
|
283
|
+
change_table(:spree_taxons) do |t|
|
284
|
+
t.change :parent_id, :bigint
|
285
|
+
t.change :taxonomy_id, :bigint
|
286
|
+
t.change :lft, :bigint
|
287
|
+
t.change :rgt, :bigint
|
288
|
+
end
|
289
|
+
|
290
|
+
change_table(:spree_users) do |t|
|
291
|
+
t.change :ship_address_id, :bigint
|
292
|
+
t.change :bill_address_id, :bigint
|
293
|
+
end
|
294
|
+
|
295
|
+
change_table(:spree_variants) do |t|
|
296
|
+
t.change :product_id, :bigint
|
297
|
+
t.change :tax_category_id, :bigint
|
298
|
+
end
|
299
|
+
|
300
|
+
change_table(:spree_zone_members) do |t|
|
301
|
+
t.change :zoneable_id, :bigint
|
302
|
+
t.change :zone_id, :bigint
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|