Files
app/scripts/deploy-schema.sh
Albert d56e19c561 feat: Add production schema deployment scripts
- Create apply-schema-prod.js for deploying schema to any SurrealDB instance
- Create deploy-schema.sh to easily deploy using .prod.env
- Add npm scripts: schema:apply (local) and schema:deploy (production)

Usage:
  pnpm schema:deploy  # Deploy to production using .prod.env

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 15:44:05 +00:00

24 lines
603 B
Bash
Executable File

#!/bin/bash
# Deploy schema to production SurrealDB
# This script reads from .prod.env and applies the schema
set -e
if [ ! -f .prod.env ]; then
echo "Error: .prod.env file not found"
echo "Please create .prod.env with your production database credentials"
exit 1
fi
echo "Loading production environment variables..."
export $(cat .prod.env | grep -v '^#' | grep '=' | xargs)
echo "Applying schema to production database..."
node scripts/apply-schema-prod.js
echo ""
echo "✓ Schema deployment complete!"
echo ""
echo "You can now test your deployment at: https://www.ponderants.com"