-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move wait-for-postgres.sh to Java #39
Conversation
@steven-sheehy in various places, I've got this code
such that if a file called |
0a594fa
to
9f72707
Compare
@gregscullard I added the stop file check to the loop. |
@steven-sheehy I've tested this PR and it looks good. I've made a few changes to fix bugs I introduced in the SQL migration scripts. |
@gregscullard I think the build is failing because I've yet to merge the new circleci config from master. I can do so soon, but it might be better if you submit your new commits as a separate PR first. The reason is because you and Calvin seem to be making contradictory changes back and forth to these SQL stored procedures and might need to sync up first and ensure you're on the same page. |
Ok. Will tidy up tomorrow
Envoyé depuis mon iPhone/Sent from my iPhone
… Le 18 août 2019 à 23:03, Steven Sheehy ***@***.***> a écrit :
@gregscullard I think the build is failing because I've yet to merge the new circleci config from master. I can do so soon, but it might be better if you submit your new commits as a separate PR first. The reason is because you and Calvin seem to be making contradictory changes back and forth to these SQL stored procedures and might need to sync up first and ensure you're on the same page.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Cool, I think your approach is probably correct and Calvin is just maybe not running flyway correctly. I have an upcoming PR to move flyway to Java code to make it run automatically. |
Part of the problem with the sql scripts is that we are targeting two different Postgres versions (11.6 on docker and 9.x in production). 9.x doesn’t support “create or replace”. Not sure if it supports “drop if not exists”. Either way, when creating a proc/function first time, there is no need to drop (the drops are left overs from the development/test process and should not have been there in the first place). When we fix an existing procedure or function we know we can drop and re-create.
Flyway enforces that every migration applies to a known state so we should be able to avoid those issues in the future.
Envoyé depuis mon iPhone/Sent from my iPhone
… Le 19 août 2019 à 01:09, Steven Sheehy ***@***.***> a écrit :
Cool, I think your approach is probably correct and Calvin is just maybe not running flyway correctly. I have an upcoming PR to move flyway to Java code to make it run automatically.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
DatabaseUtilities.openDatabase()
. Moving it to code allows both docker and non-docker deployments to startup java processes before postgresql and not immediately crash.postgresInit.sql
in docker deployments as it was failing withpsql:/docker-entrypoint-initdb.d/postgresInit.sql:32: \connect: FATAL: database "hederamirror" does not exist
Would appreciate a quick test run by someone else to make sure I didn't mess anything up.