add claimant type on avis table
This commit is contained in:
parent
bdcce19841
commit
af4a27f4e0
3 changed files with 9 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
#
|
#
|
||||||
# id :integer not null, primary key
|
# id :integer not null, primary key
|
||||||
# answer :text
|
# answer :text
|
||||||
|
# claimant_type :string
|
||||||
# confidentiel :boolean default(FALSE), not null
|
# confidentiel :boolean default(FALSE), not null
|
||||||
# email :string
|
# email :string
|
||||||
# introduction :text
|
# introduction :text
|
||||||
|
|
6
db/migrate/20210307143807_add_claimant_type_to_avis.rb
Normal file
6
db/migrate/20210307143807_add_claimant_type_to_avis.rb
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
class AddClaimantTypeToAvis < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
add_column :avis, :claimant_type, :string
|
||||||
|
remove_foreign_key :avis, :instructeurs, column: "claimant_id"
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2021_02_04_180955) do
|
ActiveRecord::Schema.define(version: 2021_03_07_143807) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -122,6 +122,7 @@ ActiveRecord::Schema.define(version: 2021_02_04_180955) do
|
||||||
t.boolean "confidentiel", default: false, null: false
|
t.boolean "confidentiel", default: false, null: false
|
||||||
t.datetime "revoked_at"
|
t.datetime "revoked_at"
|
||||||
t.bigint "experts_procedure_id"
|
t.bigint "experts_procedure_id"
|
||||||
|
t.string "claimant_type"
|
||||||
t.index ["claimant_id"], name: "index_avis_on_claimant_id"
|
t.index ["claimant_id"], name: "index_avis_on_claimant_id"
|
||||||
t.index ["dossier_id"], name: "index_avis_on_dossier_id"
|
t.index ["dossier_id"], name: "index_avis_on_dossier_id"
|
||||||
t.index ["experts_procedure_id"], name: "index_avis_on_experts_procedure_id"
|
t.index ["experts_procedure_id"], name: "index_avis_on_experts_procedure_id"
|
||||||
|
@ -729,7 +730,6 @@ ActiveRecord::Schema.define(version: 2021_02_04_180955) do
|
||||||
add_foreign_key "attestation_templates", "procedures"
|
add_foreign_key "attestation_templates", "procedures"
|
||||||
add_foreign_key "attestations", "dossiers"
|
add_foreign_key "attestations", "dossiers"
|
||||||
add_foreign_key "avis", "experts_procedures"
|
add_foreign_key "avis", "experts_procedures"
|
||||||
add_foreign_key "avis", "instructeurs", column: "claimant_id"
|
|
||||||
add_foreign_key "champs", "champs", column: "parent_id"
|
add_foreign_key "champs", "champs", column: "parent_id"
|
||||||
add_foreign_key "closed_mails", "procedures"
|
add_foreign_key "closed_mails", "procedures"
|
||||||
add_foreign_key "commentaires", "dossiers"
|
add_foreign_key "commentaires", "dossiers"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue