Cleanup demarche archivee state

This commit is contained in:
Paul Chavard 2019-12-18 13:28:29 +01:00
parent 4527124755
commit fa2eea81aa
6 changed files with 17 additions and 22 deletions

View file

@ -0,0 +1,6 @@
class AddProceduresPathClosedAtHiddenAtIndex < ActiveRecord::Migration[5.2]
def change
add_index :procedures, [:path, :closed_at, :hidden_at], unique: true
remove_index :procedures, [:path, :archived_at, :hidden_at]
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_12_11_113341) do
ActiveRecord::Schema.define(version: 2019_12_18_103727) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -505,7 +505,7 @@ ActiveRecord::Schema.define(version: 2019_12_11_113341) do
t.index ["declarative_with_state"], name: "index_procedures_on_declarative_with_state"
t.index ["hidden_at"], name: "index_procedures_on_hidden_at"
t.index ["parent_procedure_id"], name: "index_procedures_on_parent_procedure_id"
t.index ["path", "archived_at", "hidden_at"], name: "index_procedures_on_path_and_archived_at_and_hidden_at", unique: true
t.index ["path", "closed_at", "hidden_at"], name: "index_procedures_on_path_and_closed_at_and_hidden_at", unique: true
t.index ["service_id"], name: "index_procedures_on_service_id"
end