From 751cf259b767246834905ca6a64cc1910dec3c4b Mon Sep 17 00:00:00 2001 From: Tristan Chuine Date: Mon, 16 Oct 2023 17:33:52 +0200 Subject: [PATCH 1/7] Update Liquibase config Signed-off-by: Tristan Chuine --- powsybl-parent/powsybl-parent-ws/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/powsybl-parent/powsybl-parent-ws/pom.xml b/powsybl-parent/powsybl-parent-ws/pom.xml index a8bf0c7..16c956a 100644 --- a/powsybl-parent/powsybl-parent-ws/pom.xml +++ b/powsybl-parent/powsybl-parent-ws/pom.xml @@ -50,7 +50,7 @@ false - 4.20.0 + 4.24.0 - 4.23.2 + 4.24.0 3.0.2 src/main/resources/db/changelog/changesets/changelog_${maven.build.timestamp}.xml sa org.h2.Driver - jdbc:h2:./target/dummyDB + jdbc:h2:./target/dummyDB;MODE=PostgreSQL;DEFAULT_NULL_ORDERING=HIGH hibernate:spring:${liquibase-hibernate-package}?dialect=org.hibernate.dialect.PostgreSQLDialect&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy liquibase.ext.hibernate.database.connection.HibernateDriver PROPERTY_TO_BE_DEFINED_IN_PROJECTS From 5c5e167d97236a82ff0265625571ca02568a6e30 Mon Sep 17 00:00:00 2001 From: Tristan Chuine Date: Mon, 16 Oct 2023 17:35:26 +0200 Subject: [PATCH 2/7] Add Liquibase init script Signed-off-by: Tristan Chuine --- .../resources/powsybl-build-tools/liquibase-h2-init.sql | 3 +++ powsybl-parent/pom.xml | 2 +- powsybl-parent/powsybl-parent-ws/pom.xml | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql diff --git a/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql b/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql new file mode 100644 index 0000000..712b666 --- /dev/null +++ b/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql @@ -0,0 +1,3 @@ +CREATE DOMAIN JSONB AS JSON; +/*CREATE DOMAIN OID AS BINARY LARGE OBJECT;*/ +/*create domain timestampstz as timestamp;*/ diff --git a/powsybl-parent/pom.xml b/powsybl-parent/pom.xml index f8c974c..f3f3163 100644 --- a/powsybl-parent/pom.xml +++ b/powsybl-parent/pom.xml @@ -265,7 +265,7 @@ com.powsybl powsybl-build-tools - 18-SNAPSHOT + ${powsybl-build-tools.version} diff --git a/powsybl-parent/powsybl-parent-ws/pom.xml b/powsybl-parent/powsybl-parent-ws/pom.xml index 16c956a..942498e 100644 --- a/powsybl-parent/powsybl-parent-ws/pom.xml +++ b/powsybl-parent/powsybl-parent-ws/pom.xml @@ -74,7 +74,8 @@ src/main/resources/db/changelog/changesets/changelog_${maven.build.timestamp}.xml sa org.h2.Driver - jdbc:h2:./target/dummyDB;MODE=PostgreSQL;DEFAULT_NULL_ORDERING=HIGH + jdbc:h2:./target/dummyDB;MODE=PostgreSQL;DEFAULT_NULL_ORDERING=HIGH;INIT=runscript from 'classpath:/powsybl-build-tools/liquibase-h2-init.sql' + hibernate:spring:${liquibase-hibernate-package}?dialect=org.hibernate.dialect.PostgreSQLDialect&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy liquibase.ext.hibernate.database.connection.HibernateDriver PROPERTY_TO_BE_DEFINED_IN_PROJECTS @@ -203,6 +204,11 @@ jib.to.image = finalName; jakarta.validation-api ${validation-api.version} + + com.powsybl + powsybl-build-tools + ${powsybl-build-tools.version} + From 6ac7f947120b38a51979f3543db1cff710aaf308 Mon Sep 17 00:00:00 2001 From: Tristan Chuine Date: Tue, 17 Oct 2023 14:29:29 +0200 Subject: [PATCH 3/7] commit Signed-off-by: Tristan Chuine --- .../resources/powsybl-build-tools/liquibase-h2-init.sql | 6 +++--- powsybl-parent/pom.xml | 2 +- powsybl-parent/powsybl-parent-ws/pom.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql b/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql index 712b666..a0d6c2a 100644 --- a/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql +++ b/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql @@ -1,3 +1,3 @@ -CREATE DOMAIN JSONB AS JSON; -/*CREATE DOMAIN OID AS BINARY LARGE OBJECT;*/ -/*create domain timestampstz as timestamp;*/ +CREATE DOMAIN IF NOT EXISTS JSONB AS JSON; +/*CREATE DOMAIN IF NOT EXISTS OID AS BINARY LARGE OBJECT;*/ +/*create domain if not exist timestampstz as timestamp;*/ diff --git a/powsybl-parent/pom.xml b/powsybl-parent/pom.xml index f3f3163..f8c974c 100644 --- a/powsybl-parent/pom.xml +++ b/powsybl-parent/pom.xml @@ -265,7 +265,7 @@ com.powsybl powsybl-build-tools - ${powsybl-build-tools.version} + 18-SNAPSHOT diff --git a/powsybl-parent/powsybl-parent-ws/pom.xml b/powsybl-parent/powsybl-parent-ws/pom.xml index 942498e..6af016d 100644 --- a/powsybl-parent/powsybl-parent-ws/pom.xml +++ b/powsybl-parent/powsybl-parent-ws/pom.xml @@ -50,7 +50,7 @@ false - 4.24.0 + 4.24.0 - 4.24.0 + 4.20.0 - 4.24.0 + 4.23.2 3.0.2 src/main/resources/db/changelog/changesets/changelog_${maven.build.timestamp}.xml sa org.h2.Driver jdbc:h2:./target/dummyDB;MODE=PostgreSQL;DEFAULT_NULL_ORDERING=HIGH;INIT=runscript from 'classpath:/powsybl-build-tools/liquibase-h2-init.sql' - hibernate:spring:${liquibase-hibernate-package}?dialect=org.hibernate.dialect.PostgreSQLDialect&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy liquibase.ext.hibernate.database.connection.HibernateDriver PROPERTY_TO_BE_DEFINED_IN_PROJECTS From 6e168d13500b47e69e63308877fdc7f584229918 Mon Sep 17 00:00:00 2001 From: Tristan Chuine Date: Thu, 21 Dec 2023 12:20:34 +0100 Subject: [PATCH 7/7] fix bad syntax for comments Signed-off-by: Tristan Chuine --- .../main/resources/powsybl-build-tools/liquibase-h2-init.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql b/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql index d70eeb3..34f0d8a 100644 --- a/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql +++ b/powsybl-build-tools/src/main/resources/powsybl-build-tools/liquibase-h2-init.sql @@ -4,5 +4,5 @@ */; /*keep these semi-colon for not having comments in output logs*/; -/** There is some datatypes H2 in compatibility mode don"t take into account, so we create a domain/alias of equivalent type **/; +/* There is some datatypes H2 in compatibility mode don't take into account, so we create a domain/alias of equivalent type */; CREATE DOMAIN IF NOT EXISTS JSONB AS JSON;