Hi all,
I was trying to run the local WebAPI but I got the following error-
I used the following credentials to connect to the database-
I’m not quite sure how to fix this problem.
Thank you in advance for your help!
Best,
Aarti
OHDSI Home | Forums | Wiki | Github |
Hi all,
I was trying to run the local WebAPI but I got the following error-
I used the following credentials to connect to the database-
I’m not quite sure how to fix this problem.
Thank you in advance for your help!
Best,
Aarti
I believe postgresql 9.1 introduced support for ‘if not exists’ in DDL. What version of postgresql are you using?
I’m not sure why the decision was made to add this to DDL scripts managed by Flyway (as they should only be run once).
Adding @Chris_Knoll @Frank @schuemie - does WebAPI or SQL translate require a certain version for postgresql?
Installing a recent version of postgres solved the problem. Thank you!
I believe Chris was being extra careful by using the if not exists clauses. In our internal environment we’ll often design and create tables and then create scripts after they already exist, so this is helpful. It would likely be best practice for us to remove the table and then allow the migration to occur to ensure we’ve got it right.
Frank is right on both counts: I would create ‘if not exists’ in my deployment scripts so that I could have flyway run without blowing up with tables that already exist. And the second point about dropping the table to ensure the migration script creates the tables is also a good practice. It’s more challenging when the migration involves a alter/drop/add column of an existing table, but working with a small backup/restorable database can make the migration script tests trivial to perform without too much extra effort before applying it to master.