Release 2025-05-22-16vM

This commit is contained in:
pluja
2025-05-22 22:38:41 +00:00
parent d79bedf219
commit 72c238a4dc
12 changed files with 392 additions and 268 deletions

19
web/migrate.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -e
# Apply migrations
echo "Applying database migrations..."
npx prisma migrate deploy
# Apply triggers
echo "Applying database triggers..."
for trigger_file in prisma/triggers/*.sql; do
if [ -f "$trigger_file" ]; then
echo "Applying trigger: $trigger_file"
npx prisma db execute --file "$trigger_file" --schema=./prisma/schema.prisma
else
echo "No trigger files found in prisma/triggers/ or $trigger_file is not a file."
fi
done
echo "Migrations completed."