Migration
This commit is contained in:
parent
fbf0ccde20
commit
6ced107403
3 changed files with 23 additions and 0 deletions
|
@ -9,6 +9,11 @@ class Individual < ApplicationRecord
|
|||
GENDER_MALE = "M."
|
||||
GENDER_FEMALE = 'Mme'
|
||||
|
||||
enum notification_method: {
|
||||
email: 'email',
|
||||
no_notification: 'no_notification'
|
||||
}
|
||||
|
||||
def self.from_france_connect(fc_information)
|
||||
new(
|
||||
nom: fc_information.family_name,
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
class CombineDossierAndIndividualUpdates < ActiveRecord::Migration[7.0]
|
||||
disable_ddl_transaction!
|
||||
def change
|
||||
add_column :dossiers, :mandataire_first_name, :string
|
||||
add_column :dossiers, :mandataire_last_name, :string
|
||||
add_column :dossiers, :for_tiers, :boolean, default: false, null: false
|
||||
|
||||
add_column :individuals, :notification_method, :string
|
||||
add_column :individuals, :email, :string
|
||||
add_index :individuals, :email, algorithm: :concurrently
|
||||
end
|
||||
end
|
|
@ -419,6 +419,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_11_28_071043) do
|
|||
t.datetime "en_construction_close_to_expiration_notice_sent_at", precision: nil
|
||||
t.datetime "en_instruction_at", precision: nil
|
||||
t.boolean "for_procedure_preview", default: false, null: false
|
||||
t.boolean "for_tiers", default: false, null: false
|
||||
t.boolean "forced_groupe_instructeur", default: false, null: false
|
||||
t.bigint "groupe_instructeur_id"
|
||||
t.datetime "groupe_instructeur_updated_at", precision: nil
|
||||
|
@ -431,6 +432,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_11_28_071043) do
|
|||
t.datetime "last_champ_private_updated_at", precision: nil
|
||||
t.datetime "last_champ_updated_at", precision: nil
|
||||
t.datetime "last_commentaire_updated_at", precision: nil
|
||||
t.string "mandataire_first_name"
|
||||
t.string "mandataire_last_name"
|
||||
t.text "motivation"
|
||||
t.bigint "parent_dossier_id"
|
||||
t.string "prefill_token"
|
||||
|
@ -674,11 +677,14 @@ ActiveRecord::Schema[7.0].define(version: 2023_11_28_071043) do
|
|||
t.date "birthdate"
|
||||
t.datetime "created_at", precision: nil
|
||||
t.integer "dossier_id"
|
||||
t.string "email"
|
||||
t.string "gender"
|
||||
t.string "nom"
|
||||
t.string "notification_method"
|
||||
t.string "prenom"
|
||||
t.datetime "updated_at", precision: nil
|
||||
t.index ["dossier_id"], name: "index_individuals_on_dossier_id", unique: true
|
||||
t.index ["email"], name: "index_individuals_on_email"
|
||||
end
|
||||
|
||||
create_table "initiated_mails", id: :serial, force: :cascade do |t|
|
||||
|
|
Loading…
Reference in a new issue