docs: Add database environment clarification to sync script
Some checks failed
ParentFlow CI/CD Pipeline / Backend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Frontend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Security Scanning (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-app/maternal-app-backend dockerfile:Dockerfile.production name:backend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-web dockerfile:Dockerfile.production name:frontend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Development (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled

- 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 <noreply@anthropic.com>
This commit is contained in:
Andrei
2025-10-09 22:02:42 +00:00
parent c22fa82521
commit fa8db55f93

View File

@@ -6,6 +6,25 @@
# This script compares the development and production databases and automatically # This script compares the development and production databases and automatically
# synchronizes the production database to match the development schema. # 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: # Features:
# - Creates missing tables in production # - Creates missing tables in production
# - Adds missing columns to existing tables # - Adds missing columns to existing tables
@@ -36,8 +55,9 @@ NC='\033[0m' # No Color
DB_HOST="10.0.0.207" DB_HOST="10.0.0.207"
DB_USER="postgres" DB_USER="postgres"
DB_PASSWORD="a3ppq" DB_PASSWORD="a3ppq"
DEV_DB="parentflowdev" DEV_DB="parentflowdev" # Development database (used by /root/maternal-app)
PROD_DB="parentflow" 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 configuration
BACKUP_DIR="/root/maternal-app/backups/db-schema-sync" BACKUP_DIR="/root/maternal-app/backups/db-schema-sync"