feat(migration): update blog schema to add new fields and improve migration handling

This commit is contained in:
hamed
2026-07-23 23:13:15 +03:30
parent e7c2c2f06e
commit e766407bd1
3 changed files with 45 additions and 18 deletions
+5 -2
View File
@@ -29,8 +29,11 @@ if [ "${RUN_INIT:-1}" = "1" ]; then
php bin/console cache:clear --no-warmup
php bin/console cache:warmup
# Apply pending migrations. --all-or-nothing wraps them in a transaction.
php bin/console doctrine:migrations:migrate --all-or-nothing --no-interaction
# Apply pending migrations. NOT --all-or-nothing: MariaDB auto-commits on DDL
# (ALTER TABLE), which releases the transaction's savepoint mid-migration and
# then fails with "SAVEPOINT DOCTRINE_2 does not exist". Same reason liara_pre_start.sh
# omits it. DDL can't be rolled back on MariaDB anyway, so the flag only adds breakage.
php bin/console doctrine:migrations:migrate --no-interaction
fi
exec "$@"