mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
fix: add missing remote DB migrations and deploy-migrate recipe
Four ALTER TABLE / CREATE TABLE statements were applied locally but never deployed to the remote production database, causing: - acces.php → 500: share_links.is_archived missing (ShareLink::listActive/listArchived) - parametres.php → 500: smtp_settings.notify_email missing (SmtpRelay::getSettings) - /tfe?id=N → redirect-to-home: thesis_files.sort_order missing (getThesisFiles ORDER BY) - admin_audit_log table missing (AdminLogger::insertDb, best-effort but noisy) Adds four pending migrations (008–011) covering all missing schema changes. Adds 'deploy-migrate' just recipe to run migrations on the remote after deploy.
This commit is contained in:
5
justfile
5
justfile
@@ -60,6 +60,11 @@ deploy:
|
||||
app/ xamxam:/var/www/xamxam/
|
||||
ssh xamxam "mkdir -p /var/www/xamxam/var/{cache,logs,tmp}"
|
||||
|
||||
[group('deploy')]
|
||||
deploy-migrate:
|
||||
# Run pending DB migrations on the remote production database
|
||||
ssh xamxam "cd /var/www/xamxam && php migrations/run.php /var/www/xamxam/storage/xamxam.db"
|
||||
|
||||
[group('deploy')]
|
||||
deploy-db:
|
||||
@ssh xamxam '[ ! -f /var/www/xamxam/storage/xamxam.db ]' || (echo "ERROR: remote database already exists. Remove it manually if you intend to overwrite." && exit 1)
|
||||
|
||||
Reference in New Issue
Block a user