updateweb

This commit is contained in:
Local Server
2025-12-24 00:13:23 -06:00
parent e4b3de4a46
commit 017c6376fc
88 changed files with 17866 additions and 1191 deletions

29
backend/run-migration.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Run database migration as postgres user
MIGRATION_FILE="$1"
if [ -z "$MIGRATION_FILE" ]; then
echo "Usage: ./run-migration.sh <migration-file.sql>"
exit 1
fi
if [ ! -f "$MIGRATION_FILE" ]; then
echo "Error: Migration file not found: $MIGRATION_FILE"
exit 1
fi
echo "🔐 Running migration as database owner..."
echo "📁 Migration file: $MIGRATION_FILE"
echo ""
sudo -u postgres psql -d skyartshop -f "$MIGRATION_FILE"
if [ $? -eq 0 ]; then
echo ""
echo "✅ Migration completed successfully!"
else
echo ""
echo "❌ Migration failed!"
exit 1
fi