-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migratie bestanden aanmaken voor upgrade 4.0.0-4.0.1
- Loading branch information
Showing
10 changed files
with
151 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- | ||
-- upgrade Oracle BAG datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
WHENEVER SQLERROR EXIT SQL.SQLCODE | ||
BEGIN | ||
EXECUTE IMMEDIATE 'CREATE TABLE brmo_metadata(naam VARCHAR2(255 CHAR) NOT NULL, waarde CLOB, PRIMARY KEY (naam))'; | ||
EXCEPTION | ||
WHEN OTHERS THEN | ||
IF | ||
SQLCODE = -955 THEN | ||
NULL; | ||
ELSE RAISE; | ||
END IF; | ||
END; | ||
/ | ||
MERGE INTO brmo_metadata USING DUAL ON (naam = 'brmoversie') WHEN NOT MATCHED THEN INSERT (naam) VALUES('brmoversie'); | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,23 @@ | ||
-- | ||
-- upgrade Oracle BRK datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
WHENEVER SQLERROR EXIT SQL.SQLCODE | ||
BEGIN | ||
EXECUTE IMMEDIATE 'CREATE TABLE brmo_metadata(naam VARCHAR2(255 CHAR) NOT NULL, waarde CLOB, PRIMARY KEY (naam))'; | ||
EXCEPTION | ||
WHEN OTHERS THEN | ||
IF | ||
SQLCODE = -955 THEN | ||
NULL; | ||
ELSE RAISE; | ||
END IF; | ||
END; | ||
/ | ||
MERGE INTO brmo_metadata USING DUAL ON (naam = 'brmoversie') WHEN NOT MATCHED THEN INSERT (naam) VALUES('brmoversie'); | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,11 @@ | ||
-- | ||
-- upgrade Oracle RSGB datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
WHENEVER SQLERROR EXIT SQL.SQLCODE | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,23 @@ | ||
-- | ||
-- upgrade Oracle RSGBBGT datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
WHENEVER SQLERROR EXIT SQL.SQLCODE | ||
BEGIN | ||
EXECUTE IMMEDIATE 'CREATE TABLE brmo_metadata(naam VARCHAR2(255 CHAR) NOT NULL, waarde CLOB, PRIMARY KEY (naam))'; | ||
EXCEPTION | ||
WHEN OTHERS THEN | ||
IF | ||
SQLCODE = -955 THEN | ||
NULL; | ||
ELSE RAISE; | ||
END IF; | ||
END; | ||
/ | ||
MERGE INTO brmo_metadata USING DUAL ON (naam = 'brmoversie') WHEN NOT MATCHED THEN INSERT (naam) VALUES('brmoversie'); | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,11 @@ | ||
-- | ||
-- upgrade Oracle STAGING datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
WHENEVER SQLERROR EXIT SQL.SQLCODE | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,13 @@ | ||
-- | ||
-- upgrade PostgreSQL BAG datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
CREATE SCHEMA IF NOT EXISTS bag; | ||
|
||
SET search_path = bag,public; | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,15 @@ | ||
-- | ||
-- upgrade PostgreSQL BRK datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
CREATE SCHEMA IF NOT EXISTS brk; | ||
|
||
SET search_path = brk,public; | ||
|
||
SET SCHEMA 'brk'; | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,11 @@ | ||
-- | ||
-- upgrade PostgreSQL RSGB datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
set search_path = public,bag,brk; | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
12 changes: 12 additions & 0 deletions
12
datamodel/upgrade_scripts/4.0.0-4.0.1/postgresql/rsgbbgt.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,12 @@ | ||
-- | ||
-- upgrade PostgreSQL RSGBBGT datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS brmo_metadata(naam CHARACTER VARYING(255) NOT NULL, waarde TEXT, CONSTRAINT brmo_metadata_pk PRIMARY KEY (naam)); | ||
INSERT INTO brmo_metadata(naam) VALUES('brmoversie') ON CONFLICT DO NOTHING; | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |
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,9 @@ | ||
-- | ||
-- upgrade PostgreSQL STAGING datamodel van 4.0.0 naar 4.0.1 | ||
-- | ||
|
||
|
||
-- onderstaande dienen als laatste stappen van een upgrade uitgevoerd | ||
INSERT INTO brmo_metadata (naam,waarde) SELECT 'upgrade_4.0.0_naar_4.0.1','vorige versie was ' || waarde FROM brmo_metadata WHERE naam='brmoversie'; | ||
-- versienummer update | ||
UPDATE brmo_metadata SET waarde='4.0.1' WHERE naam='brmoversie'; |