From fa8db55f936a1a2a7533cc1bb72f053111170d1f Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 9 Oct 2025 22:02:42 +0000 Subject: [PATCH] docs: Add database environment clarification to sync script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Document that parentflowdev is development database - Document that parentflow is production database - Document that parentflowadmin is shared between environments - Clarify server locations and usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- scripts/sync-database-schema.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) 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"