fix(migration): migration id to name

This commit is contained in:
Stan Girard 2023-07-03 11:35:02 +02:00
parent a1a9793556
commit ba0fac51c6

View File

@ -35,7 +35,7 @@ else
# Running migrations
# Get the last migration that was executed
LAST_MIGRATION=$(PGPASSWORD=${DB_PASSWORD} psql -h "${DB_HOST}" -p "${DB_PORT}" -d "${DB_NAME}" -U "${DB_USER}" -tAc "SELECT id FROM migrations ORDER BY executed_at DESC LIMIT 1;")
LAST_MIGRATION=$(PGPASSWORD=${DB_PASSWORD} psql -h "${DB_HOST}" -p "${DB_PORT}" -d "${DB_NAME}" -U "${DB_USER}" -tAc "SELECT name FROM migrations ORDER BY executed_at DESC LIMIT 1;")
echo "Last migration executed: $LAST_MIGRATION"
# Iterate through the migration files