mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 22:06:42 +02:00
Move inactive projects out of active workspace: - bauntown (community website) - maerchenzauber (AI story generation) - memoro (voice memo app) - news (news aggregation) - nutriphi (nutrition tracking) - reader (reading app) - uload (URL shortener) - wisekeep (AI wisdom extraction) Update CLAUDE.md documentation: - Add presi to active projects - Document archived projects section - Update workspace configuration Archived apps can be re-activated by moving back to apps/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
40 lines
1.2 KiB
Bash
Executable file
40 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Run migration to add is_favorite column to stories table
|
|
# This script connects to Supabase and runs the migration
|
|
|
|
# Source environment variables from backend
|
|
cd "$(dirname "$0")/.."
|
|
|
|
# Get Supabase credentials from environment
|
|
SUPABASE_URL="${MAERCHENZAUBER_SUPABASE_URL}"
|
|
SUPABASE_SERVICE_KEY="${MAERCHENZAUBER_SUPABASE_SERVICE_ROLE_KEY}"
|
|
|
|
if [ -z "$SUPABASE_URL" ] || [ -z "$SUPABASE_SERVICE_KEY" ]; then
|
|
echo "❌ Error: Supabase credentials not found in environment"
|
|
echo "Please ensure MAERCHENZAUBER_SUPABASE_URL and MAERCHENZAUBER_SUPABASE_SERVICE_ROLE_KEY are set"
|
|
exit 1
|
|
fi
|
|
|
|
echo "🔄 Running migration: add_is_favorite_to_stories.sql"
|
|
echo "📍 Supabase URL: $SUPABASE_URL"
|
|
|
|
# Extract database connection details
|
|
DB_HOST=$(echo $SUPABASE_URL | sed -E 's|https://([^.]+)\.supabase\.co.*|\1.supabase.co|')
|
|
DB_NAME="postgres"
|
|
DB_USER="postgres"
|
|
|
|
# Use psql to run the migration
|
|
export PGPASSWORD="$SUPABASE_SERVICE_KEY"
|
|
|
|
psql -h "db.${DB_HOST}" \
|
|
-U "$DB_USER" \
|
|
-d "$DB_NAME" \
|
|
-f migrations/add_is_favorite_to_stories.sql
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "✅ Migration completed successfully!"
|
|
else
|
|
echo "❌ Migration failed"
|
|
exit 1
|
|
fi
|