From 1cbad1057d9d1743796d8ae5ae7aa0bcba32414a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 2 Dec 2025 09:33:55 +0100 Subject: [PATCH] cloudron-support: with equal timestamps, order by name --- scripts/cloudron-support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cloudron-support b/scripts/cloudron-support index 39398a4b4..267fbb407 100755 --- a/scripts/cloudron-support +++ b/scripts/cloudron-support @@ -864,7 +864,7 @@ function apply_patch() { } function check_db_migrations() { - local -r last_migration_from_db="$(mysql -NB -uroot -ppassword -e "SELECT name FROM box.migrations ORDER BY run_on DESC LIMIT 1" 2>/dev/null).js" + local -r last_migration_from_db="$(mysql -NB -uroot -ppassword -e "SELECT name FROM box.migrations ORDER BY run_on DESC, name DESC LIMIT 1" 2>/dev/null).js" local -r last_migration_file="/$(ls --ignore schema.sql --ignore initial-schema.sql /home/yellowtent/box/migrations/ | sort | tail -1)" if [[ "${last_migration_from_db}" != "${last_migration_file}" ]]; then fail "Database migrations are pending. Last migration in DB: ${last_migration_from_db}. Last migration file: ${last_migration_file}."