feat: add team_lead role to user management and update related functionalities
This commit is contained in:
30
run-migrations.sh
Normal file
30
run-migrations.sh
Normal 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"
|
||||
Reference in New Issue
Block a user