-
Notifications
You must be signed in to change notification settings - Fork 24
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
Added script to apply all new evolutions #3427
Conversation
tools/postgres/apply_evolutions.sh
Outdated
|
||
# get list of schemas to apply | ||
files="" | ||
for entry in "../../conf/evolutions"/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I get the absolute path to this folder?
When I run ./apply_evolutions.sh
from the right directory everything works, but when I run yarn apply-evolutions
it seems like it does not find the evolutions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could make the path be relative to the script’s directory
https://stackoverflow.com/a/246128/7564727
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use scriptdir="$(dirname "$0")"
to get the path of the script, and then use everything relatively to that. An example is https://github.com/scalableminds/webknossos/blob/master/tools/postgres/ensure_db.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice script! 👍 Please add the small changes @fm3 and I suggested, then this is ready for merge :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🚢
* origin/master: Optimize performance for the list request /api/datasets (#3441) add annotation dataset foreign key (#3482) thumbnails: correctly use zoom value if specified (#3487) Store Meshes in Postgres (#3367) fix alpha return (#3483) Added script to apply all new evolutions (#3427) Simple fix to speed up dataset gallery (#3480) better errors for screenshot tests, fix imports, refresh screenshots (#3479) (Backend only) Add project priority to progress report json (#3476) Handle missing write access on datastore (#3411) Re-introduce "Flightmode improvements"" (#3473) Circleci-notify: linkify PR number (#3469) Revert "Flightmode improvements" (#3472) also flow-ignore binaryData when using symlinks (#3471) Flightmode improvements (#3392) Circleci custom notification (#3465) enable /api/switch cross-organization (#3464)
Steps to test:
yarn apply-evolutions
Issues:
Updated changelogUpdated migration guide if applicableUpdated documentation if applicableNeeds datastore update after deployment