Merge pull request #5719 from coopdevs/index-state-changes

Index spree_state_changes.stateful_id column
This commit is contained in:
Luis Ramos
2020-07-03 23:02:01 +01:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
class AddStatefulIdIndexToStateChanges < ActiveRecord::Migration
def change
add_index :spree_state_changes, :stateful_id
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20200630070422) do
ActiveRecord::Schema.define(version: 20200702112157) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -885,6 +885,8 @@ ActiveRecord::Schema.define(version: 20200630070422) do
t.string "next_state"
end
add_index "spree_state_changes", ["stateful_id"], name: "index_spree_state_changes_on_stateful_id", using: :btree
create_table "spree_states", force: true do |t|
t.string "name"
t.string "abbr"