diff --git a/scripts/sync-database-schema.sh b/scripts/sync-database-schema.sh index ba6ed93..ae8846b 100755 --- a/scripts/sync-database-schema.sh +++ b/scripts/sync-database-schema.sh @@ -6,6 +6,25 @@ # This script compares the development and production databases and automatically # synchronizes the production database to match the development schema. # +# DATABASE ENVIRONMENTS: +# ---------------------- +# Development Environment (this server: /root/maternal-app): +# - Uses database: parentflowdev +# - Location: 10.0.0.207 +# - This is where we develop and test changes +# +# Production Environment (server: 10.0.0.240 /root/parentflowapp-prod): +# - Uses database: parentflow +# - Location: 10.0.0.207 (same database server, different database) +# - This is the live application serving users +# +# Admin Database (shared between environments): +# - Uses database: parentflowadmin +# - Location: 10.0.0.207 +# - Shared admin panel database for both dev and production +# +# This script syncs: parentflowdev (dev) → parentflow (production) +# # Features: # - Creates missing tables in production # - Adds missing columns to existing tables @@ -36,8 +55,9 @@ NC='\033[0m' # No Color DB_HOST="10.0.0.207" DB_USER="postgres" DB_PASSWORD="a3ppq" -DEV_DB="parentflowdev" -PROD_DB="parentflow" +DEV_DB="parentflowdev" # Development database (used by /root/maternal-app) +PROD_DB="parentflow" # Production database (used by 10.0.0.240:/root/parentflowapp-prod) +ADMIN_DB="parentflowadmin" # Shared admin database (both environments) # Backup configuration BACKUP_DIR="/root/maternal-app/backups/db-schema-sync"