From 48de522a262b4cc9f928db5301e2394bd508859e Mon Sep 17 00:00:00 2001 From: Youssef Date: Sun, 9 Aug 2026 00:55:25 +0200 Subject: [PATCH] fix: ajouter migration Flyway V45 pour mettre a jour la base existante avec les nouvelles colonnes de flocage --- .../V44__add_flocage_export_fields_to_dotation.sql | 6 ++---- .../db/migration/V45__update_flocage_export_fields.sql | 7 +++++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 as-talange-core/src/main/resources/db/migration/V45__update_flocage_export_fields.sql diff --git a/as-talange-core/src/main/resources/db/migration/V44__add_flocage_export_fields_to_dotation.sql b/as-talange-core/src/main/resources/db/migration/V44__add_flocage_export_fields_to_dotation.sql index 9e422af..d5ad5a8 100644 --- a/as-talange-core/src/main/resources/db/migration/V44__add_flocage_export_fields_to_dotation.sql +++ b/as-talange-core/src/main/resources/db/migration/V44__add_flocage_export_fields_to_dotation.sql @@ -1,4 +1,2 @@ -ALTER TABLE dotation ADD COLUMN flocage_initiales_exporte BOOLEAN NOT NULL DEFAULT FALSE; -ALTER TABLE dotation ADD COLUMN date_flocage_initiales TIMESTAMP NULL; -ALTER TABLE dotation ADD COLUMN flocage_prenom_numero_exporte BOOLEAN NOT NULL DEFAULT FALSE; -ALTER TABLE dotation ADD COLUMN date_flocage_prenom_numero TIMESTAMP NULL; +ALTER TABLE dotation ADD COLUMN flocage_exporte BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE dotation ADD COLUMN date_flocage TIMESTAMP NULL; diff --git a/as-talange-core/src/main/resources/db/migration/V45__update_flocage_export_fields.sql b/as-talange-core/src/main/resources/db/migration/V45__update_flocage_export_fields.sql new file mode 100644 index 0000000..bb78757 --- /dev/null +++ b/as-talange-core/src/main/resources/db/migration/V45__update_flocage_export_fields.sql @@ -0,0 +1,7 @@ +ALTER TABLE dotation DROP COLUMN IF EXISTS flocage_exporte; +ALTER TABLE dotation DROP COLUMN IF EXISTS date_flocage; + +ALTER TABLE dotation ADD COLUMN IF NOT EXISTS flocage_initiales_exporte BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE dotation ADD COLUMN IF NOT EXISTS date_flocage_initiales TIMESTAMP NULL; +ALTER TABLE dotation ADD COLUMN IF NOT EXISTS flocage_prenom_numero_exporte BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE dotation ADD COLUMN IF NOT EXISTS date_flocage_prenom_numero TIMESTAMP NULL;