-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
2,747 additions
and
2,702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
set -o nounset | ||
|
||
usage() { | ||
cat <<EOF | ||
Usage: | ||
$(basename "$0") [ARGS] | ||
Run migrations for the Mindlogger backend and (or) for the Mindlogger arbitrary servers. | ||
NOTE: If no ARGS provided, apply migrations only for Mindlogger backend. | ||
ARGS: | ||
arbitrary Apply migrations only for arbitrary servers | ||
all Apply migrations both for Mindlogger backend and for arbitrary servers | ||
Help: | ||
--help Print this message and exit | ||
EOF | ||
} | ||
|
||
case "${1:-}" in | ||
--help) | ||
usage | ||
exit 0 | ||
;; | ||
arbitrary) | ||
echo 'Applying migrations for arbitrary servers' | ||
alembic -c alembic_arbitrary.ini upgrade head | ||
;; | ||
all) | ||
echo 'Applying migrations for Mindlogger backend' | ||
alembic upgrade head | ||
echo 'Applying migrations for arbitrary servers' | ||
alembic -c alembic_arbitrary.ini upgrade head | ||
;; | ||
*) | ||
echo 'Applying migrations for Mindlogger backend' | ||
alembic upgrade head | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.