Update Config local to remote name
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
## When to Use
|
||||
|
||||
Run database migrations for SandboxLocal environment, apply pending EF Core migrations, create backups, and verify connectivity.
|
||||
Run database migrations for SandboxRemote environment, apply pending EF Core migrations, create backups, and verify connectivity.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- .NET SDK installed (`dotnet --version`)
|
||||
- PostgreSQL accessible for SandboxLocal
|
||||
- Connection string in `appsettings.SandboxLocal.json`
|
||||
- PostgreSQL accessible for SandboxRemote
|
||||
- Connection string in `appsettings.SandboxRemote.json`
|
||||
- `scripts/safe-migrate.sh` available and executable
|
||||
|
||||
## Execution Steps
|
||||
@@ -23,13 +23,13 @@ Check: `test -f scripts/safe-migrate.sh`
|
||||
|
||||
### Step 2: Verify Environment Configuration
|
||||
|
||||
Check: `test -f src/Managing.Api/appsettings.SandboxLocal.json`
|
||||
Check: `test -f src/Managing.Api/appsettings.SandboxRemote.json`
|
||||
|
||||
**If missing:** Check `appsettings.Sandbox.json`, else **STOP**
|
||||
|
||||
### Step 3: Run Migration Script
|
||||
|
||||
Run: `./scripts/safe-migrate.sh SandboxLocal`
|
||||
Run: `./scripts/safe-migrate.sh SandboxRemote`
|
||||
|
||||
**Script performs:** Build projects → Check connectivity → Create DB if needed → Prompt backup → Check pending changes → Generate script → Apply migrations → Verify status
|
||||
|
||||
@@ -43,7 +43,7 @@ Run: `./scripts/safe-migrate.sh SandboxLocal`
|
||||
|
||||
**Not executable:** `chmod +x scripts/safe-migrate.sh`, retry
|
||||
|
||||
**Database connection fails:** Verify PostgreSQL running, check connection string in `appsettings.SandboxLocal.json`, verify network/firewall/credentials
|
||||
**Database connection fails:** Verify PostgreSQL running, check connection string in `appsettings.SandboxRemote.json`, verify network/firewall/credentials
|
||||
|
||||
**Build fails:** Show errors (C# compilation, missing dependencies, config errors), try auto-fix (compilation errors, imports, config), if fixed re-run else **STOP**
|
||||
|
||||
@@ -57,7 +57,7 @@ Run: `./scripts/safe-migrate.sh SandboxLocal`
|
||||
1. Verify script → ✅
|
||||
2. Check executable → ✅
|
||||
3. Verify config → ✅
|
||||
4. Run: `./scripts/safe-migrate.sh SandboxLocal`
|
||||
4. Run: `./scripts/safe-migrate.sh SandboxRemote`
|
||||
5. Script: Build → Connect → Backup → Generate → Apply → Verify → ✅
|
||||
6. Show backup/log locations
|
||||
|
||||
@@ -70,7 +70,7 @@ Run: `./scripts/safe-migrate.sh SandboxLocal`
|
||||
- ✅ Backup recommended, script prompts for it
|
||||
- ✅ Review migration script before applying
|
||||
- ✅ Idempotent migrations - safe to run multiple times
|
||||
- ⚠️ Environment: `SandboxLocal`, Config: `appsettings.SandboxLocal.json`
|
||||
- ⚠️ Backups: `scripts/backups/SandboxLocal/`, Logs: `scripts/logs/`
|
||||
- ⚠️ Environment: `SandboxRemote`, Config: `appsettings.SandboxRemote.json`
|
||||
- ⚠️ Backups: `scripts/backups/SandboxRemote/`, Logs: `scripts/logs/`
|
||||
- 📦 Keeps last 5 backups automatically
|
||||
|
||||
|
||||
Reference in New Issue
Block a user