Closed sureshg closed 7 years ago
One more issue, this time is syntax error 😟
[INFO] Keywhiz Model ...................................... FAILURE [ 5.432 s]
[INFO] Keywhiz Log ........................................ SKIPPED
[INFO] Keywhiz Server ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.135 s
[INFO] Finished at: 2017-01-08T05:24:38+00:00
[INFO] Final Memory: 41M/454M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:3.2:migrate (default) on project keywhiz-model: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
[ERROR] Migration V5__add_index_current_to_secrets.sql failed
[ERROR] -----------------------------------------------------
[ERROR] SQL State : 42601
[ERROR] Error Code : 0
[ERROR] Message : syntax error at or near "`"
[ERROR] Location : /root/keywhiz/model/../server/src/main/resources/db/postgres/migration/V5__add_index_current_to_secrets.sql (/root/keywhiz/model/../server/src/main/resources/db/postgres/migration/V5__add_index_current_to_secrets.sql)
[ERROR] Line : 1
[ERROR] Statement : CREATE INDEX secrets_current_idx ON secrets (`current`)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.flywaydb:flyway-maven-plugin:3.2:migrate (default) on project keywhiz-model: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
Migration V5__add_index_current_to_secrets.sql failed
-----------------------------------------------------
SQL State : 42601
Error Code : 0
Message : syntax error at or near "`"
Location : /root/keywhiz/model/../server/src/main/resources/db/postgres/migration/V5__add_index_current_to_secrets.sql (/root/keywhiz/model/../server/src/main/resources/db/postgres/migration/V5__add_index_current_to_secrets.sql)
Line : 1
Statement : CREATE INDEX secrets_current_idx ON secrets (`current`)
The fix is to remove backticks - CREATE INDEX secrets_current_idx ON secrets (current)
Seems like need to do some testing for dbs except H2.
See https://github.com/square/keywhiz/issues/291
We are planning to remove postgres support as it's unused & untested
Just tried to generate Keywhiz JOOQ Model for postgres and it's failing with
Found more than one migration with version 3.6
error. As a workaround, I had to rename one of the migration fileError,
The documentation for production setup is really sparse. It would be great to add more documentation on how to do a production setup (eg: Postgres server running on a different machine and how to generate the jooq models)
By the way, I am really surprised to see these kinds of errors 😄