Apicurio/apicurio-studio

Connecting ApicurioStudio to Postgresql fails running non-postgres migrations

andreaTP opened this issue · 2 comments

Seems like the migrations are not run for the correct DB type:

Discussed in #2217

Originally posted by SkyTaill June 20, 2023
Hi,
I have some problem with apicurio-api service - some problem with connect to Postgresql. what could be the problem?

  • postgres:15.2
  • apicurio-studio-platforms-quarkus-api 0.2.62

2023-06-20 10:30:53,587 ERROR [io.und.req.io] (executor-thread-0) Exception handling request 9378c0fb-3099-4e19-b518-c798b60ac8cc-1 to /currentuser/activity: org.jboss.resteasy.spi.UnhandledException: org.jdbi.v3.core.statement.UnableToExecuteStatementException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "AUTO_INCREMENT"
Position: 37 [statement:"CREATE TABLE api_designs (id BIGINT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, description VARCHAR(1024), created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP NOT NULL, tags VARCHAR(2048), api_type VARCHAR(255) NOT NULL)", arguments:{positional:{}, named:{}, finder:[]}]

image
2023-06-20 10:30:53,587 ERROR [io.und.req.io] (executor-thread-0) Exception handling request 9378c0fb-3099-4e19-b518-c798b60ac8cc-1 to /currentuser/activity: org.jboss.resteasy.spi.UnhandledException: org.jdbi.v3.core.statement.UnableToExecuteStatementException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "AUTO_INCREMENT"
Position: 37 [statement:"CREATE TABLE api_designs (id BIGINT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, description VARCHAR(1024), created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP NOT NULL, tags VARCHAR(2048), api_type VARCHAR(255) NOT NULL)", arguments:{positional:{}, named:{}, finder:[]}]

@SkyTaill any chance you could include the full stack trace? It's cut off in the screenshot and the full trace (with any "caused by" traces) would be helpful.