diff --git a/.build/ci/oracle-execute-upgrade-extras.sh b/.build/ci/oracle-execute-upgrade-extras.sh index c0e4e9cd15..1c5db49016 100755 --- a/.build/ci/oracle-execute-upgrade-extras.sh +++ b/.build/ci/oracle-execute-upgrade-extras.sh @@ -10,11 +10,11 @@ export SQLPATH=./.build/ci if [ $CURSNAPSHOT = "5.0.0-SNAPSHOT" ] && [ $1 = "rsgb" ] then -# docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/FREE < ./datamodel/utility_scripts/oracle/205_delete_brk_brondocumenten.sql + docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/FREE < ./datamodel/utility_scripts/oracle/205_delete_brk_brondocumenten.sql docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/FREE < ./datamodel/extra_scripts/oracle/301_drop_brk1_tabellen.sql fi -#if [ $CURSNAPSHOT = "5.0.0-SNAPSHOT" ] && [ $1 = "staging" ] -#then -# docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/FREE < ./datamodel/utility_scripts/oracle/1000_delete_bag_berichten.sql -#fi +if [ $CURSNAPSHOT = "5.0.0-SNAPSHOT" ] && [ $1 = "staging" ] +then + docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/FREE < ./datamodel/utility_scripts/oracle/1001_delete_brk1_berichten.sql +fi diff --git a/.build/ci/pgsql-execute-upgrade-extras.sh b/.build/ci/pgsql-execute-upgrade-extras.sh index 8d53a97f16..59dc43c0e1 100755 --- a/.build/ci/pgsql-execute-upgrade-extras.sh +++ b/.build/ci/pgsql-execute-upgrade-extras.sh @@ -7,11 +7,11 @@ echo "Verwerk extra upgrade scripts voor: " $1 if [ $CURSNAPSHOT = "5.0.0-SNAPSHOT" ] && [ $1 = "rsgb" ] then -# psql -U postgres -h localhost -d $1 -f ./datamodel/utility_scripts/postgresql/205_delete_brk_brondocumenten.sql + psql -U postgres -h localhost -d $1 -f ./datamodel/utility_scripts/postgresql/205_delete_brk_brondocumenten.sql psql -U postgres -h localhost -d $1 -f ./datamodel/extra_scripts/postgresql/301_drop_brk1_tabellen.sql fi -#if [ $CURSNAPSHOT = "5.0.0-SNAPSHOT" ] && [ $1 = "staging" ] -#then -# docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/XE < ./datamodel/utility_scripts/postgresql/1000_delete_bag_berichten.sql -#fi +if [ $CURSNAPSHOT = "5.0.0-SNAPSHOT" ] && [ $1 = "staging" ] +then + docker exec -i oracle_brmo sqlplus -l -S jenkins_$1/jenkins_$1@//localhost:1521/XE < ./datamodel/utility_scripts/postgresql/1001_delete_brk1_berichten.sql +fi diff --git a/brmo-dist/assembly.xml b/brmo-dist/assembly.xml index 2632edd5c0..4cf3012f2f 100644 --- a/brmo-dist/assembly.xml +++ b/brmo-dist/assembly.xml @@ -167,6 +167,14 @@ **/1000_*.sql + + ../${project.basedir}/datamodel/extra_scripts/ + db/utility_scripts/4.0.0-5.0.0 + + **/205_*.sql + **/1001_*.sql + + ../${project.basedir}/ diff --git a/datamodel/utility_scripts/oracle/1001_delete_brk1_berichten.sql b/datamodel/utility_scripts/oracle/1001_delete_brk1_berichten.sql new file mode 100644 index 0000000000..0bd3fc6851 --- /dev/null +++ b/datamodel/utility_scripts/oracle/1001_delete_brk1_berichten.sql @@ -0,0 +1,3 @@ +-- verwijder alle BRK 1 data uit de staging database +DELETE FROM bericht WHERE soort = 'brk'; +DELETE FROM laadproces WHERE soort = 'brk'; \ No newline at end of file diff --git a/datamodel/utility_scripts/postgresql/1001_delete_brk1_berichten.sql b/datamodel/utility_scripts/postgresql/1001_delete_brk1_berichten.sql new file mode 100644 index 0000000000..6728bd46c3 --- /dev/null +++ b/datamodel/utility_scripts/postgresql/1001_delete_brk1_berichten.sql @@ -0,0 +1,3 @@ +-- verwijder alle BAG 1 data uit de staging database +delete from bericht where soort = 'brk'; +delete from laadproces where soort = 'brk'; \ No newline at end of file