File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,3 +81,12 @@ ETHEREAL_PASSWORD=
8181# This is required when serving the app after running migrations locally.
8282# Otherwise we'll probably run into race condition sync issues.
8383DISABLE_DB_PUSH = false
84+
85+
86+ # Uncomment to run production backup locally after testing latest migration
87+ # (start the container via: pnpm cdwr → test-migration, choose to keep it running)
88+ # DATABASE_URL=postgresql://postgres:postgres@localhost:5435/cms
89+ # DEPLOY_ENV=production
90+ # DISABLE_DB_PUSH=true
91+ # SEED_SOURCE=off
92+ # TENANT_ID=
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { backupCmsDatabase } from './db-tools/lib/backup-db.js';
66import { dropDatabase } from './db-tools/lib/drop-db.js' ;
77import { restoreCmsDatabase } from './db-tools/lib/restore-db.js' ;
88import { syncCmsStorage } from './db-tools/lib/sync-storage.js' ;
9+ import { testMigration } from './db-tools/lib/test-migration.js' ;
910import { showAppInfo } from './fly-tools/lib/app-info.js' ;
1011import { patchFlyConfig } from './fly-tools/lib/patch-config.js' ;
1112import { restartApp } from './fly-tools/lib/restart-app.js' ;
@@ -30,6 +31,11 @@ const tools: Tool[] = [
3031 description : 'Restore CMS database to Supabase' ,
3132 action : restoreCmsDatabase
3233 } ,
34+ {
35+ name : 'test-migration' ,
36+ description : 'Test latest migration against a production backup in Docker' ,
37+ action : testMigration
38+ } ,
3339 {
3440 name : 'sync-storage' ,
3541 description : 'Sync CMS media storage from Supabase S3' ,
You can’t perform that action at this time.
0 commit comments