feat: add team_lead role to user management and update related functionalities

This commit is contained in:
2025-11-14 08:08:01 +01:00
parent eec0c0a281
commit 23b3c0e9e8
8 changed files with 123 additions and 5 deletions

30
run-migrations.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# Database migration runner for deployment
# This script runs all pending migrations in order
echo "🔄 Running database migrations..."
# List of migration scripts to run (in order)
MIGRATIONS=(
"migrate-add-team-lead-role.mjs"
)
for migration in "${MIGRATIONS[@]}"; do
if [ -f "$migration" ]; then
echo "Running migration: $migration"
if node "$migration"; then
echo "✅ Migration $migration completed successfully"
# Optionally move completed migration to a completed folder
# mkdir -p migrations/completed
# mv "$migration" "migrations/completed/"
else
echo "❌ Migration $migration failed"
exit 1
fi
else
echo "Migration file $migration not found, skipping..."
fi
done
echo "✅ All migrations completed"