DB CompareComparison of database schemas Run
General DescriptionA Visual Studio Code extension that helps you compare the structure of two databases and shows the differences in a clear table format. Supported databases:
You can compare any pair:
This tool is very useful for database migrations, replication, change audits, and syncing environments (development / testing / production). Connection stringspostgrepostgresql://reader:NWDMCE5xdipIjRrp@hh-pgsql-public.ebi.ac.uk:5432/pfmegrnargs mssqlServer=myserverhost_or_ip;Database=myDbName;User Id=JohnDoe;Password=mySecretPassword;TrustServerCertificate=True;Encrypt=True; How is it different from other tools?Simple and native – No need to install extra programs or agents. Everything works inside VS Code using the Flexible filters – You can easily hide temporary tables, test schemas, or other objects using regular expressions. Caching – After the first comparison, the metadata is saved on your computer. Next time it runs very fast — in just a few seconds. Easy interface – Two display modes (detailed and grouped), and colors to show differences (pink = missing, yellow = small differences in properties). Works offline – After loading the cache, you can view results even without connecting to the database. Unlike big paid tools (like Redgate or ApexSQL), this is a lightweight, free extension that solves 90% of everyday schema comparison tasks. Schema MappingWhy do we need schema mapping? In different databases, the same logical schema can have different names:
If you compare databases without mapping, the tool may think objects are different just because the schema names don't match. Schema mapping lets you create rules to match them:
After mapping, objects with different schema names will be correctly compared. The rules are saved and work between VS Code sessions. Type NormalizationDifferent databases use different names for similar data types:
The extension can automatically normalize these types to a common form:
This helps compare columns at a logical level, ignoring small syntax differences. Important: You can turn normalization on or off with a checkbox. If you want to see the original types, just disable it. Filters (Excluding Temporary Objects)Big databases often have many temporary tables:
These objects make the comparison messy and slow. Filters help you control what you see:
Example of useful exclude rules for temporary tables:
Tip: Use include filters to check only specific schemas, and exclude filters to remove "garbage". Caching and ExportAfter the first comparison, all metadata is saved in a local cache. Future comparisons with the same connection strings are very fast. You can see all saved caches on the Cache tab. You can:
Import of other users' caches (planned)We are planning to add the ability to import caches from other people. This will allow:
This feature is under discussion and will be added in a future version. Conclusion
If you work with MSSQL and PostgreSQL, this extension will save you many hours of manual work. LicenseMIT |