-
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 paramètre pour gérer l'emprise par défaut de la carte grand…
… public Issue #222010 Change-Id: I0e9a5bdef18bf0a98cb1c27159583c3f8b08f5db
- Loading branch information
Showing
4 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
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
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
38 changes: 38 additions & 0 deletions
38
server/sdis-remocra/home/postgres/remocra_db/patches/202/202.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,38 @@ | ||
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 := 202; | ||
description_patch := 'Ajoute un paramètre pour centrer la carte grand public'; | ||
|
||
-- 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 | ||
INSERT INTO remocra.parametre (cle_parametre, valeur_parametre, type_parametre, description_parametre, categorie_parametre) | ||
VALUES('CENTRAGE_GRAND_PUBLIC', null, 'STRING', 'Boîte englobante par défaut pour la carte grand public', 'GENERAL') | ||
ON CONFLICT (cle_parametre) DO NOTHING; | ||
|
||
|
||
-- Contenu réel du patch fin | ||
-------------------------------------------------- | ||
COMMIT; |