This extension allows you to connect to both your local and production PostgreSQL databases, visually compare their schemas, and safely synchronize changes from development to production. It features a database explorer treeview, detailed schema diffing, change preview, safe migration execution, and rollback support.
- Database Connections: Add, test, and manage multiple connections (local, production, staging, etc.).
- Explorer Treeview: Visualize all database objects (tables, views, functions, procedures, sequences, types, schemas) in a hierarchical, searchable tree.
- Schema Comparison: Compare full schemas or selected objects; view detailed, color-coded diffs.
- Migration & Sync: Select changes, preview migration SQL, execute safely with dry-run and rollback options.
- Object Details: View columns, constraints, indexes, source code, sample data, and more for any DB object.
- Settings & Customization: Ignore lists, strict/lenient comparison, notification preferences.
- Help & Support: FAQs, troubleshooting, easy feedback/reporting.
+----------------------------+
| VSCode Extension UI |
| (Webview, Treeview) |
+-------------+--------------+
|
|
+-------------V---------------+
| Extension Backend (Node.js)|
| - Controller/Coordinator |
| - Schema Compare Module |
| - Migration Generator |
+-------------+---------------+
|
+--+----------V--------+------+
| |
v v
+------------+ +----------------+
| Local | | Production |
| Postgres | | Postgres |
+------------+ +----------------+
flowchart TD
subgraph VSCode Extension
UI[UI Webview Panel]
Tree[Database Explorer Treeview]
Cmd[Command Palette]
UI --> Backend
Tree --> Backend
Cmd --> Backend
end
subgraph Extension Backend (Node.js)
Backend[Controller/Coordinator]
Compare[Schema Comparison Module]
Migrate[Migration Generator]
Backend --> Compare
Backend --> Migrate
end
subgraph Databases
Local[Local PostgreSQL]
Prod[Production PostgreSQL]
end
Compare -- Fetches Metadata --> Local
Compare -- Fetches Metadata --> Prod
Migrate -- Generates SQL --> Prod
- Connect to Local & Production Databases
- Securely add and test connections using the VSCode UI.
- Explore Database Objects
- Use the treeview to browse tables, views, functions, procedures, etc.
- Click any object for detailed schema info and sample data.
- Compare Schemas
- Select whole DB or specific objects for comparison.
- View color-coded visual diff showing adds, deletes, changes.
- Sync Changes
- Choose which changes to sync from local to production.
- Preview generated SQL migration.
- Dry-run available to simulate changes.
- Confirm before executing on production DB.
- View Logs & Rollback
- Success/failure logs for every migration.
- Rollback SQL generated for safe recovery.
- Customize & Get Help
- Manage ignore lists, comparison strictness, notification settings.
- Access help, troubleshooting, and submit feedback via the extension.
- Connection credentials are stored securely using VSCode Secret Storage.
- All destructive actions (e.g., DROP TABLE) require explicit confirmation.
- Migration logs and rollback scripts provide safety and auditability.
- Install the extension from the VSCode Marketplace.
- Open the command palette and run
Postgres: Add Connection
to set up your databases. - Use the "Postgres Explorer" view to browse objects.
- Run
Postgres: Compare Schemas
to start a comparison. - Review differences, select changes, and sync safely!