chore(distro-ddl): DDL rebuild
MODIFY
distro/data/src/main/resources/ddls/apiman_mssql15.ddl
distro/data/src/main/resources/ddls/apiman_mssql15.ddl
-- Update Database Script
-- *********************************************************************
-- Change Log: /Users/msavy/oss/apiman/apiman/distro/ddl/src/main/liquibase/master.xml
--- Ran at: 05/10/2021, 14:42
+-- Ran at: 21/10/2021, 12:57
-- Against: apiman@offline:mssql?version=15&caseSensitive=true&catalog=apiman&changeLogFile=/Users/msavy/oss/apiman/apiman/distro/ddl/target/changelog/mssql/databasechangelog.csv
-- Liquibase version: 4.4.3
-- *********************************************************************
@@ -450,3 +450,27 @@ GO
CREATE TABLE api_tag (api_id varchar(255) NOT NULL, org_id varchar(255) NOT NULL, tag_id bigint NOT NULL, CONSTRAINT PK_API_TAG PRIMARY KEY (api_id, org_id, tag_id))
GO
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-6::msavy (generated)
+CREATE TABLE blob_store (id varchar(255) NOT NULL, mrblobby varbinary(MAX) NOT NULL, created_on datetime NOT NULL, hash bigint NOT NULL, mime_type varchar(255) NOT NULL, modified_on datetime NOT NULL, name varchar(255) NOT NULL, [references] int NOT NULL, CONSTRAINT blob_storePK PRIMARY KEY (id))
+GO
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-7::msavy (generated)
+CREATE TABLE outbox (id bigint IDENTITY (1, 1) NOT NULL, event_version bigint NOT NULL, payload binary(1) NOT NULL, source varchar(255) NOT NULL, subject varchar(255) NOT NULL, time datetime NOT NULL, type varchar(255) NOT NULL, CONSTRAINT outboxPK PRIMARY KEY (id))
+GO
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-8::msavy (generated)
+ALTER TABLE blob_store ADD CONSTRAINT UC_BLOB_STOREID_COL UNIQUE (id)
+GO
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-10::msavy (generated)
+ALTER TABLE blob_store ADD CONSTRAINT UK_4jee67ekw7s4y8spoc58i4dsf UNIQUE (hash, mime_type, name)
+GO
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-15::msavy (generated)
+ALTER TABLE api_tag ADD CONSTRAINT FK2h64maqscweorti1hta9josl2 FOREIGN KEY (tag_id) REFERENCES KeyValueTag (id)
+GO
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-16::msavy (generated)
+ALTER TABLE api_tag ADD CONSTRAINT FKlpr8yu65omneju5297uqthb6k FOREIGN KEY (api_id, org_id) REFERENCES apis (id, organization_id)
+GO
+

MODIFY
distro/data/src/main/resources/ddls/apiman_oracle19.ddl
distro/data/src/main/resources/ddls/apiman_oracle19.ddl
-- Update Database Script
-- *********************************************************************
-- Change Log: /Users/msavy/oss/apiman/apiman/distro/ddl/src/main/liquibase/master.xml
--- Ran at: 05/10/2021, 14:42
+-- Ran at: 21/10/2021, 12:57
-- Against: apiman@offline:oracle?version=19&caseSensitive=true&changeLogFile=/Users/msavy/oss/apiman/apiman/distro/ddl/target/changelog/oracle/databasechangelog.csv
-- Liquibase version: 4.4.3
-- *********************************************************************
@@ -337,3 +337,21 @@ CREATE TABLE KeyValueTag (id NUMBER(38, 0) GENERATED BY DEFAULT AS IDENTITY NOT
-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633441143380-5::msavy (generated)
CREATE TABLE api_tag (api_id VARCHAR2(255) NOT NULL, org_id VARCHAR2(255) NOT NULL, tag_id NUMBER(38, 0) NOT NULL, CONSTRAINT PK_API_TAG PRIMARY KEY (api_id, org_id, tag_id));
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-6::msavy (generated)
+CREATE TABLE blob_store (id VARCHAR2(255) NOT NULL, mrblobby BLOB NOT NULL, created_on TIMESTAMP NOT NULL, hash NUMBER(38, 0) NOT NULL, mime_type VARCHAR2(255) NOT NULL, modified_on TIMESTAMP NOT NULL, name VARCHAR2(255) NOT NULL, references INTEGER NOT NULL, CONSTRAINT blob_storePK PRIMARY KEY (id));
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-7::msavy (generated)
+CREATE TABLE outbox (id NUMBER(38, 0) GENERATED BY DEFAULT AS IDENTITY NOT NULL, event_version NUMBER(38, 0) NOT NULL, payload RAW NOT NULL, source VARCHAR2(255) NOT NULL, subject VARCHAR2(255) NOT NULL, time TIMESTAMP NOT NULL, type VARCHAR2(255) NOT NULL, CONSTRAINT outboxPK PRIMARY KEY (id));
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-8::msavy (generated)
+ALTER TABLE blob_store ADD CONSTRAINT UC_BLOB_STOREID_COL UNIQUE (id);
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-10::msavy (generated)
+ALTER TABLE blob_store ADD CONSTRAINT UK_4jee67ekw7s4y8spoc58i4dsf UNIQUE (hash, mime_type, name);
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-15::msavy (generated)
+ALTER TABLE api_tag ADD CONSTRAINT FK2h64maqscweorti1hta9josl2 FOREIGN KEY (tag_id) REFERENCES KeyValueTag (id);
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-16::msavy (generated)
+ALTER TABLE api_tag ADD CONSTRAINT FKlpr8yu65omneju5297uqthb6k FOREIGN KEY (api_id, org_id) REFERENCES apis (id, organization_id);
+

MODIFY
distro/data/src/main/resources/ddls/apiman_postgresql9.ddl
distro/data/src/main/resources/ddls/apiman_postgresql9.ddl
-- Update Database Script
-- *********************************************************************
-- Change Log: /Users/msavy/oss/apiman/apiman/distro/ddl/src/main/liquibase/master.xml
--- Ran at: 05/10/2021, 14:42
+-- Ran at: 21/10/2021, 12:57
-- Against: apiman@offline:postgresql?version=9.6.23&caseSensitive=true&changeLogFile=/Users/msavy/oss/apiman/apiman/distro/ddl/target/changelog/postgresql/databasechangelog.csv
-- Liquibase version: 4.4.3
-- *********************************************************************
@@ -375,4 +375,21 @@ CREATE OPERATOR = (
procedure = inttobool,
commutator = =,
negator = !=
-);
\ No newline at end of file
+);-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-6::msavy (generated)
+CREATE TABLE blob_store (id VARCHAR(255) NOT NULL, mrblobby OID NOT NULL, created_on TIMESTAMP WITHOUT TIME ZONE NOT NULL, hash BIGINT NOT NULL, mime_type VARCHAR(255) NOT NULL, modified_on TIMESTAMP WITHOUT TIME ZONE NOT NULL, name VARCHAR(255) NOT NULL, "references" INTEGER NOT NULL, CONSTRAINT "blob_storePK" PRIMARY KEY (id));
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-7::msavy (generated)
+CREATE TABLE outbox (id BIGSERIAL NOT NULL, event_version BIGINT NOT NULL, payload BYTEA NOT NULL, source VARCHAR(255) NOT NULL, subject VARCHAR(255) NOT NULL, time TIMESTAMP WITHOUT TIME ZONE NOT NULL, type VARCHAR(255) NOT NULL, CONSTRAINT "outboxPK" PRIMARY KEY (id));
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-8::msavy (generated)
+ALTER TABLE blob_store ADD CONSTRAINT UC_BLOB_STOREID_COL UNIQUE (id);
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-10::msavy (generated)
+ALTER TABLE blob_store ADD CONSTRAINT "UK_4jee67ekw7s4y8spoc58i4dsf" UNIQUE (hash, mime_type, name);
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-15::msavy (generated)
+ALTER TABLE api_tag ADD CONSTRAINT "FK2h64maqscweorti1hta9josl2" FOREIGN KEY (tag_id) REFERENCES "KeyValueTag" (id);
+
+-- Changeset src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml::1633542267834-16::msavy (generated)
+ALTER TABLE api_tag ADD CONSTRAINT "FKlpr8yu65omneju5297uqthb6k" FOREIGN KEY (api_id, org_id) REFERENCES apis (id, organization_id);
+

MODIFY
distro/ddl/pom.xml
distro/ddl/pom.xml
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- <version>${version.com.h2database}</version>
+ <version>1.4.200</version> <!-- 1.4.200 has JSON type, so we can work around liquibase and a custom type definition it still breaking (output works OK for <1.4.200 w/ custom type) -->
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<verbose>true</verbose>
</configuration>
</execution>
+
+ <!-- Generate MySQL DDL (should work for MariaDB also?) -->
+ <execution>
+ <id>mysql-ddl</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>updateSQL</goal>
+ </goals>
+ <configuration>
+ <migrationSqlOutputFile>${basedir}/target/apiman_mysql8.ddl</migrationSqlOutputFile>
+ <driver>com.mysql.cj.jdbc.Driver</driver>
+ <url>offline:mysql?version=8.0.27&amp;caseSensitive=true&amp;catalog=apiman&amp;changeLogFile=${basedir}/target/changelog/mssql/databasechangelog.csv</url>
+ <username>apiman</username>
+ <password>apiman</password>
+ <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
+ <verbose>true</verbose>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>

ADD
distro/ddl/src/main/liquibase/current/201-add-json-type.changelog.xml
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.1.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
+ <changeSet author="msavy marc@blackparrotlabs.io" id="h2-json-type" dbms="h2">
+ <comment>H2 JSON field (needed for versions older than 1.4.200)</comment>
+ <sql stripComments="true">CREATE domain IF NOT EXISTS json AS other</sql>
+ </changeSet>
+</databaseChangeLog>
\ No newline at end of file

MODIFY
distro/ddl/src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml
distro/ddl/src/main/liquibase/current/20211002-154432-apiman3-dev-portal-2-initial.changelog.xml
<changeSet author="msavy (generated)" id="1633542267834-8">
<addUniqueConstraint columnNames="id" constraintName="UC_BLOB_STOREID_COL" tableName="blob_store"/>
</changeSet>
-<!-- <changeSet author="msavy (generated)" id="1633542267834-9">-->
-<!-- <addUniqueConstraint columnNames="plan_id, plan_org_id, version" constraintName="UK53ss55b2hiye2e9v6lftdo5jg" tableName="plan_versions"/>-->
-<!-- </changeSet>-->
<changeSet author="msavy (generated)" id="1633542267834-10">
<addUniqueConstraint columnNames="hash, mime_type, name" constraintName="UK_4jee67ekw7s4y8spoc58i4dsf" tableName="blob_store"/>
</changeSet>
-<!-- <changeSet author="msavy (generated)" id="1633542267834-11">-->
-<!-- <addUniqueConstraint columnNames="key" constraintName="UK_9ag6p3dn96urpj910hbblr5d7" tableName="KeyValueTag"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-12">-->
-<!-- <addUniqueConstraint columnNames="user_id, role_id, org_id" constraintName="UKfwy6c61bcnvshcsxubanjvi08" tableName="memberships"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-13">-->
-<!-- <addUniqueConstraint columnNames="group_id, artifact_id" constraintName="UKofbok9ushig9vviq01dnu11x" tableName="plugins"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-14">-->
-<!-- <addUniqueConstraint columnNames="userId, type" constraintName="UserAllowedOnlyOneOfEachNotificationType" tableName="notification_preferences"/>-->
-<!-- </changeSet>-->
<changeSet author="msavy (generated)" id="1633542267834-15">
<addForeignKeyConstraint baseColumnNames="tag_id" baseTableName="api_tag" constraintName="FK2h64maqscweorti1hta9josl2" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="KeyValueTag" validate="true"/>
</changeSet>
<changeSet author="msavy (generated)" id="1633542267834-16">
<addForeignKeyConstraint baseColumnNames="api_id,org_id" baseTableName="api_tag" constraintName="FKlpr8yu65omneju5297uqthb6k" deferrable="false" initiallyDeferred="false" referencedColumnNames="id,organization_id" referencedTableName="apis" validate="true"/>
</changeSet>
-<!-- <changeSet author="msavy (generated)" id="1633542267834-1">-->
-<!-- <alterSequence startValue="69" incrementBy="10" sequenceName="hibernate_sequence"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-2">-->
-<!-- <dropPrimaryKey tableName="api_plans"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-3">-->
-<!-- <addPrimaryKey columnNames="api_version_id, expose_in_portal, plan_id, requires_approval, version" tableName="api_plans"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-4">-->
-<!-- <dropPrimaryKey tableName="users"/>-->
-<!-- </changeSet>-->
-<!-- <changeSet author="msavy (generated)" id="1633542267834-5">-->
-<!-- <addPrimaryKey columnNames="username" constraintName="usersPK" tableName="users"/>-->
-<!-- </changeSet>-->
</databaseChangeLog>

MODIFY
manager/api/beans/src/main/java/io/apiman/manager/api/beans/notifications/NotificationEntity.java
manager/api/beans/src/main/java/io/apiman/manager/api/beans/notifications/NotificationEntity.java
@@ -32,9 +32,8 @@ import org.hibernate.annotations.UpdateTimestamp;
* @author Marc Savy {@literal <marc@blackparrotlabs.io>}
*/
@Entity
-@TypeDefs({
@TypeDef(name = "json", typeClass = JsonType.class)
-})@Table(name = "notifications")
+@Table(name = "notifications")
public class NotificationEntity {
@Id

MODIFY
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/JpaStorageInitializer.java
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/JpaStorageInitializer.java
@@ -32,18 +32,21 @@ import javax.sql.DataSource;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.ResultSetHandler;
-import org.hibernate.Hibernate;
import org.hibernate.dialect.H2Dialect;
-import org.hibernate.dialect.MySQL57InnoDBDialect;
-import org.hibernate.dialect.MySQL5Dialect;
-import org.hibernate.dialect.MySQL5InnoDBDialect;
+import org.hibernate.dialect.MySQL8Dialect;
import org.hibernate.dialect.MySQLDialect;
-import org.hibernate.dialect.Oracle10gDialect;
-import org.hibernate.dialect.Oracle12cDialect;
+import org.hibernate.dialect.Oracle8iDialect;
+import org.hibernate.dialect.Oracle9iDialect;
+import org.hibernate.dialect.OracleDialect;
+import org.hibernate.dialect.PostgreSQL81Dialect;
import org.hibernate.dialect.PostgreSQL82Dialect;
+import org.hibernate.dialect.PostgreSQL91Dialect;
import org.hibernate.dialect.PostgreSQL92Dialect;
+import org.hibernate.dialect.PostgreSQL93Dialect;
import org.hibernate.dialect.PostgreSQL94Dialect;
+import org.hibernate.dialect.PostgreSQL95Dialect;
import org.hibernate.dialect.PostgreSQL9Dialect;
+import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.dialect.SQLServer2012Dialect;
import org.hibernate.dialect.SQLServerDialect;
@@ -58,27 +61,29 @@ public class JpaStorageInitializer {
private static final IApimanLogger LOGGER = ApimanLoggerFactory.getLogger(JpaStorageInitializer.class);
private static final Map<String, String> DB_TYPE_MAP = new HashMap<>();
static {
- DB_TYPE_MAP.put(ApimanH2Dialect.class.getName(), "h2"); //$NON-NLS-1$
- DB_TYPE_MAP.put(H2Dialect.class.getName(), "h2"); //$NON-NLS-1$
-
- DB_TYPE_MAP.put(ApimanMySQL5Dialect.class.getName(), "mysql5"); //$NON-NLS-1$
- DB_TYPE_MAP.put(MySQL5Dialect.class.getName(), "mysql5"); //$NON-NLS-1$
- DB_TYPE_MAP.put(MySQLDialect.class.getName(), "mysql5"); //$NON-NLS-1$
- DB_TYPE_MAP.put(MySQL5InnoDBDialect.class.getName(), "mysql5"); //$NON-NLS-1$
- DB_TYPE_MAP.put(MySQL57InnoDBDialect.class.getName(), "mysql5"); //$NON-NLS-1$
-
- DB_TYPE_MAP.put(ApimanOracle12Dialect.class.getName(), "oracle12"); //$NON-NLS-1$
- DB_TYPE_MAP.put(Oracle12cDialect.class.getName(), "oracle12"); //$NON-NLS-1$
- DB_TYPE_MAP.put(Oracle10gDialect.class.getName(), "oracle12"); //$NON-NLS-1$
- // TODO: update these mappings
- DB_TYPE_MAP.put(ApimanPostgreSQLDialect.class.getName(), "postgresql9"); //$NON-NLS-1$
- DB_TYPE_MAP.put(PostgreSQL9Dialect.class.getName(), "postgresql9"); //$NON-NLS-1$
- DB_TYPE_MAP.put(PostgreSQL82Dialect.class.getName(), "postgresql9"); //$NON-NLS-1$
- DB_TYPE_MAP.put(PostgreSQL92Dialect.class.getName(), "postgresql9"); //$NON-NLS-1$
- DB_TYPE_MAP.put(PostgreSQL94Dialect.class.getName(), "postgresql9"); //$NON-NLS-1$
-
- DB_TYPE_MAP.put(SQLServer2012Dialect.class.getName(), "mssql11"); //$NON-NLS-1$
- DB_TYPE_MAP.put(SQLServerDialect.class.getName(), "mssql11"); //$NON-NLS-1$
+ DB_TYPE_MAP.put(ApimanH2Dialect.class.getName(), "h2");
+ DB_TYPE_MAP.put(H2Dialect.class.getName(), "h2");
+
+ DB_TYPE_MAP.put(MySQLDialect.class.getName(), "mysql8");
+ DB_TYPE_MAP.put(MySQL8Dialect.class.getName(), "mysql8");
+
+ DB_TYPE_MAP.put(OracleDialect.class.getName(), "oracle19");
+ DB_TYPE_MAP.put(Oracle8iDialect.class.getName(), "oracle19");
+ DB_TYPE_MAP.put(Oracle9iDialect.class.getName(), "oracle19");
+
+ DB_TYPE_MAP.put(PostgreSQLDialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL81Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL82Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL9Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL91Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL92Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL93Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL94Dialect.class.getName(), "postgresql9");
+ DB_TYPE_MAP.put(PostgreSQL95Dialect.class.getName(), "postgresql9");
+
+ DB_TYPE_MAP.put(SQLServerDialect.class.getName(), "mssql15");
+ DB_TYPE_MAP.put(SQLServer2012Dialect.class.getName(), "mssql15");
+
}
private final DataSource ds;
@@ -89,12 +94,15 @@ public class JpaStorageInitializer {
*/
public JpaStorageInitializer(String dsJndiLocation, String hibernateDialect) {
if (dsJndiLocation == null) {
- throw new RuntimeException("Missing datasource JNDI location from JPA storage configuration."); //$NON-NLS-1$
+ throw new RuntimeException("Missing datasource JNDI location from JPA storage configuration.");
}
ds = lookupDS(dsJndiLocation);
+
+
+
dbType = DB_TYPE_MAP.get(hibernateDialect);
if (dbType == null) {
- throw new RuntimeException("Unknown hibernate dialect configured: " + hibernateDialect); //$NON-NLS-1$
+ throw new RuntimeException("Unknown hibernate dialect configured: " + hibernateDialect);
}
}
@@ -112,7 +120,7 @@ public class JpaStorageInitializer {
}
if (ds == null) {
- throw new RuntimeException("Datasource not found: " + dsJndiLocation); //$NON-NLS-1$
+ throw new RuntimeException("Datasource not found: " + dsJndiLocation);
}
return ds;
}
@@ -122,8 +130,6 @@ public class JpaStorageInitializer {
*/
@SuppressWarnings("nls")
public void initialize() {
- System.out.println("Going to try to initialise JPA storage");
-
QueryRunner run = new QueryRunner(ds);
Boolean isInitialized;

MODIFY
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/model/outbox/OutboxEventEntity.java
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/model/outbox/OutboxEventEntity.java
package io.apiman.manager.api.jpa.model.outbox;
import java.time.OffsetDateTime;
-import java.util.Objects;
import java.util.StringJoiner;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.databind.JsonNode;
-import com.vladmihalcea.hibernate.type.json.JsonNodeBinaryType;
-import org.hibernate.Hibernate;
+import com.vladmihalcea.hibernate.type.json.JsonType;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
@@ -31,7 +27,7 @@ import org.hibernate.annotations.TypeDef;
* @author Marc Savy {@literal <marc@blackparrotlabs.io>}
*/
@Entity
-@TypeDef(name = "jsonb", typeClass = JsonNodeBinaryType.class)
+@TypeDef(name = "json", typeClass = JsonType.class)
@Table(name = "outbox")
public class OutboxEventEntity {
@@ -61,8 +57,8 @@ public class OutboxEventEntity {
@NotNull
private Long eventVersion;
- @Type(type = "jsonb")
- @Column(name = "payload", columnDefinition = "binary", nullable = false)
+ @Type(type = "json")
+ @Column(name = "payload", columnDefinition = "json", nullable = false)
@NotNull
private JsonNode payload;

chore(distro-ddl): DDL rebuild