diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 09b3d8961..808389a94 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -6,6 +6,7 @@ # aasm_state :string default("brouillon") # allow_expert_review :boolean default(TRUE), not null # api_entreprise_token :string +# api_particulier_scopes :text default([]), is an Array # ask_birthday :boolean default(FALSE), not null # auto_archive_on :date # cadre_juridique :string diff --git a/db/migrate/20210908162000_add_api_particulier_scopes_to_procedure.rb b/db/migrate/20210908162000_add_api_particulier_scopes_to_procedure.rb new file mode 100644 index 000000000..00cb0f221 --- /dev/null +++ b/db/migrate/20210908162000_add_api_particulier_scopes_to_procedure.rb @@ -0,0 +1,5 @@ +class AddAPIParticulierScopesToProcedure < ActiveRecord::Migration[6.1] + def change + add_column :procedures, :api_particulier_scopes, :text, array: true, default: [] + end +end diff --git a/db/schema.rb b/db/schema.rb index 6a5f1c695..f84356e36 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,8 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_08_27_161956) do - +ActiveRecord::Schema.define(version: 2021_09_08_162000) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" enable_extension "unaccent" @@ -617,8 +616,9 @@ ActiveRecord::Schema.define(version: 2021_08_27_161956) do t.bigint "draft_revision_id" t.bigint "published_revision_id" t.boolean "allow_expert_review", default: true, null: false - t.string "encrypted_api_particulier_token" t.boolean "experts_require_administrateur_invitation", default: false + t.string "encrypted_api_particulier_token" + t.text "api_particulier_scopes", default: [], array: true t.index ["declarative_with_state"], name: "index_procedures_on_declarative_with_state" t.index ["draft_revision_id"], name: "index_procedures_on_draft_revision_id" t.index ["hidden_at"], name: "index_procedures_on_hidden_at"