-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajoute un flag dans incoming.HydrantVisite pour savoir si les anomali…
…es ont changé Change-Id: Ic1c9b598428b0fd0889489a418be126008dddf6a
- Loading branch information
Emilie Genton
committed
Oct 5, 2023
1 parent
9adb9d5
commit 64324cb
Showing
5 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
7 changes: 6 additions & 1 deletion
7
api-remocra/api/src/main/jooq/fr/sdis83/remocra/db/model/incoming/tables/HydrantVisite.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 16 additions & 2 deletions
18
...cra/api/src/main/jooq/fr/sdis83/remocra/db/model/incoming/tables/pojos/HydrantVisite.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
server/sdis-remocra/home/postgres/remocra_db/patches/185/185.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
begin; | ||
set statement_timeout = 0; | ||
set client_encoding = 'UTF8'; | ||
set standard_conforming_strings = off; | ||
set check_function_bodies = false; | ||
set client_min_messages = warning; | ||
set escape_string_warning = off; | ||
set search_path = remocra, pdi, public, pg_catalog; | ||
-------------------------------------------------- | ||
-- Versionnement du patch et vérification | ||
-- | ||
create or replace function versionnement_dffd4df4df() returns void language plpgsql AS $body$ | ||
declare | ||
numero_patch int; | ||
description_patch varchar; | ||
begin | ||
-- Métadonnées du patch | ||
numero_patch := 185; | ||
description_patch := 'Ajoute une colonne dans incoming.hydrantVisite pour spécifier si les anomalies ont changées'; | ||
|
||
-- Vérification | ||
if (select numero_patch-1 != (select max(numero) from remocra.suivi_patches)) then | ||
raise exception 'Le numéro de patch requis n''est pas le bon. Dernier appliqué : %, en cours : %', (select max(numero) from remocra.suivi_patches), numero_patch; end if; | ||
-- Suivi | ||
insert into remocra.suivi_patches(numero, description) values(numero_patch, description_patch); | ||
end $body$; | ||
select versionnement_dffd4df4df(); | ||
drop function versionnement_dffd4df4df(); | ||
-------------------------------------------------- | ||
-- Contenu réel du patch début | ||
|
||
ALTER TABLE incoming.hydrant_visite ADD COLUMN has_anomalie_changes boolean default false not null; | ||
|
||
-- Contenu réel du patch fin | ||
-------------------------------------------------- | ||
COMMIT; |