-
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.
Passe l'allocationsize des sequences GenerationType.SEQUENCE à 1
Par défaut Hibernate a un allocationSize à 50, et alloue des paquets de 50 pour chaque valeur réelle de la séquence soit [curVal50, curVal50 + 50-1], ce qui empêche l'insertion par un autre biais (SQL, PDI). Remettre un allocationSize à 1 permet une utilisation "normale" de la séquence Issue : #204332 Change-Id: I68767cb040eb2bf7586d34c040f20fce23af1937
- Loading branch information
1 parent
232c71f
commit 3fee4b1
Showing
13 changed files
with
72 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
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
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
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
45 changes: 45 additions & 0 deletions
45
server/sdis-remocra/home/postgres/remocra_db/patches/196/196.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,45 @@ | ||
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 := 196; | ||
description_patch := 'Remet toutes les séquences gérées par hibernate à jour'; | ||
|
||
-- 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 | ||
SELECT setval('hydrant_indispo_temporaire_id_seq', (SELECT MAX(id) FROM remocra.hydrant_indispo_temporaire)+1); | ||
SELECT setval('type_hydrant_indispo_statut_id_seq', (SELECT MAX(id) FROM remocra.type_hydrant_indispo_statut)+1); | ||
SELECT setval('type_oldeb_acces_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_acces)+1); | ||
SELECT setval('type_oldeb_action_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_action)+1); | ||
SELECT setval('type_oldeb_anomalie_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_anomalie)+1); | ||
SELECT setval('type_oldeb_avis_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_avis)+1); | ||
SELECT setval('type_oldeb_caracteristique_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_caracteristique)+1); | ||
SELECT setval('type_oldeb_categorie_anomalie_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_categorie_anomalie)+1); | ||
SELECT setval('type_oldeb_categorie_caracteristique_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_categorie_caracteristique)+1); | ||
SELECT setval('type_oldeb_debroussaillement_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_debroussaillement)+1); | ||
SELECT setval('type_oldeb_residence_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_residence)+1); | ||
SELECT setval('type_oldeb_zone_urbanisme_id_seq', (SELECT MAX(id) FROM remocra.type_oldeb_zone_urbanisme)+1); | ||
-- Contenu réel du patch fin | ||
-------------------------------------------------- | ||
COMMIT; |