This commit is contained in:
parent
2704c5b117
commit
be4dca4a74
@ -14,8 +14,9 @@ if [[ "$dnim_database_count" = "0" ]]; then
|
||||
echo "fresh database"
|
||||
query "$POSTGRES_URI/postgres" "create database dnim;"
|
||||
ls ./schema/ | xargs -I{} bash -c "$(declare -f query_file); query_file \"$POSTGRES_URI/dnim\" ./schema/{}"
|
||||
rev_last='empty'
|
||||
script=''
|
||||
|
||||
head=$(git rev-parse --short HEAD)
|
||||
query "$POSTGRES_URI/dnim" "insert into migration (from_revision, to_revision) values ('empty', '$head');"
|
||||
else
|
||||
get_rev_last="copy (select to_revision from migration order by performed_on desc limit 1) to stdout with null as '';"
|
||||
rev_last=$(psql "$POSTGRES_URI/dnim" -c "$get_rev_last")
|
||||
|
Loading…
Reference in New Issue
Block a user