diff --git a/db/migrate/20200702112157_add_stateful_id_index_to_state_changes.rb b/db/migrate/20200702112157_add_stateful_id_index_to_state_changes.rb new file mode 100644 index 0000000000..8a52643cff --- /dev/null +++ b/db/migrate/20200702112157_add_stateful_id_index_to_state_changes.rb @@ -0,0 +1,5 @@ +class AddStatefulIdIndexToStateChanges < ActiveRecord::Migration + def change + add_index :spree_state_changes, :stateful_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 6867489e98..97ddcb63d2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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"