Don't run postgres migrate on a new DB
continuous-integration/drone/push Build is failing Details

This commit is contained in:
3wc 2023-07-19 11:41:20 +01:00
parent e487a36bb5
commit 68f23084aa
1 changed files with 27 additions and 25 deletions

View File

@ -11,6 +11,7 @@ if [ -e $MIGRATION_MARKER ]; then
exit 1
fi
if [ -f $PGDATA/PG_VERSION ]; then
DATA_VERSION=$(cat $PGDATA/PG_VERSION)
if [ -n "$DATA_VERSION" -a "$PG_MAJOR" != "$DATA_VERSION" ]; then
@ -38,5 +39,6 @@ if [ -n "$DATA_VERSION" -a "$PG_MAJOR" != "$DATA_VERSION" ]; then
rm $MIGRATION_MARKER
echo "migration complete"
fi
fi
/usr/local/bin/docker-entrypoint.sh postgres