From d00bdbe1b8caa55a0259269b9ecc8fbefd89e43a Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 29 Mar 2021 13:42:24 +0100 Subject: [PATCH] Add index on spree_shipping_methods.tax_category_id --- ...10329123820_add_index_on_shipping_methods_tax_category.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20210329123820_add_index_on_shipping_methods_tax_category.rb diff --git a/db/migrate/20210329123820_add_index_on_shipping_methods_tax_category.rb b/db/migrate/20210329123820_add_index_on_shipping_methods_tax_category.rb new file mode 100644 index 0000000000..dcc1103fdc --- /dev/null +++ b/db/migrate/20210329123820_add_index_on_shipping_methods_tax_category.rb @@ -0,0 +1,5 @@ +class AddIndexOnShippingMethodsTaxCategory < ActiveRecord::Migration[5.0] + def change + add_index :spree_shipping_methods, :tax_category_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 1ed302c3cf..454f7688d3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20210320003951) do +ActiveRecord::Schema.define(version: 20210329123820) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -811,6 +811,7 @@ ActiveRecord::Schema.define(version: 20210320003951) do t.text "description" t.string "tracking_url", limit: 255 t.integer "tax_category_id" + t.index ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id", using: :btree end create_table "spree_shipping_methods_zones", id: false, force: :cascade do |t|