{"id":32124340,"url":"https://github.com/nguyenngoclongdev/vs-data-sync","last_synced_at":"2026-03-06T15:02:01.467Z","repository":{"id":185068290,"uuid":"672956192","full_name":"nguyenngoclongdev/vs-data-sync","owner":"nguyenngoclongdev","description":"Automated tool for comparing database schemas and data. It can compare two databases, whether they are local or remote, and automatically produce a migration file of the differences.","archived":false,"fork":false,"pushed_at":"2025-08-18T01:09:27.000Z","size":216,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-20T21:51:41.649Z","etag":null,"topics":["apply","changes","compare","database","diff","migrate","postgres","sync"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=nguyenngoclong.data-sync","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nguyenngoclongdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["nguyenngoclongdev"],"ko_fi":"nguyenngoclong","patreon":"nguyenngoclong","custom":"https://paypal.me/longnguyenngoc"}},"created_at":"2023-07-31T14:40:27.000Z","updated_at":"2025-10-03T22:29:42.000Z","dependencies_parsed_at":"2023-08-19T16:04:47.632Z","dependency_job_id":"1cbc4bf4-f322-4950-8b6b-45e9af99f561","html_url":"https://github.com/nguyenngoclongdev/vs-data-sync","commit_stats":null,"previous_names":["nguyenngoclongdev/vs-data-sync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nguyenngoclongdev/vs-data-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fvs-data-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fvs-data-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fvs-data-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fvs-data-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nguyenngoclongdev","download_url":"https://codeload.github.com/nguyenngoclongdev/vs-data-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fvs-data-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30182686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apply","changes","compare","database","diff","migrate","postgres","sync"],"created_at":"2025-10-20T21:51:08.288Z","updated_at":"2026-03-06T15:02:01.462Z","avatar_url":"https://github.com/nguyenngoclongdev.png","language":"TypeScript","funding_links":["https://github.com/sponsors/nguyenngoclongdev","https://ko-fi.com/nguyenngoclong","https://patreon.com/nguyenngoclong","https://paypal.me/longnguyenngoc"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/logo.png\" width=\"120\" height=\"120\" /\u003e\n\u003c/p\u003e\n\n[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/nguyenngoclong.data-sync)](https://marketplace.visualstudio.com/items?itemName=nguyenngoclong.data-sync)\n[![Open VSX Installs](https://img.shields.io/open-vsx/dt/nguyenngoclong/data-sync?color=%2396C41F\u0026label=open-vsx)](https://open-vsx.org/extension/nguyenngoclong/data-sync)\n[![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/nguyenngoclong.data-sync?label=vs-marketplace)](https://marketplace.visualstudio.com/items?itemName=nguyenngoclong.data-sync)\n[![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/nguyenngoclong.data-sync)](https://marketplace.visualstudio.com/items?itemName=nguyenngoclong.data-sync)\n[![Visual Studio Marketplace Rating (Stars)](https://img.shields.io/visual-studio-marketplace/stars/nguyenngoclong.data-sync)](https://marketplace.visualstudio.com/items?itemName=nguyenngoclong.data-sync)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)\n\n# data-sync\n\n`Data Sync` is an automated tool for comparing database schemas and data. It can compare two databases, whether they are local or remote, and automatically produce a migration file of the differences.\n\nIf you find this extension useful for your projects, please consider supporting me by [Github](https://github.com/sponsors/nguyenngoclongdev), [Patreon](https://patreon.com/nguyenngoclong), [KO-FI](https://ko-fi.com/nguyenngoclong) or [Paypal](https://paypal.me/longnguyenngoc). It's a great way to help me maintain and improve this tool in the future. Your support is truly appreciated!\n\n[![Github](https://img.shields.io/badge/Github-F15689?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/sponsors/nguyenngoclongdev)\n[![Patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge\u0026logo=patreon\u0026logoColor=white)](https://patreon.com/nguyenngoclong)\n[![KO-FI](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](https://ko-fi.com/nguyenngoclong)\n[![Paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white)](https://paypal.me/longnguyenngoc)\n\n# Installation\n\nGet it from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=nguyenngoclong.data-sync) or [Open VSX Registry](https://open-vsx.org/extension/nguyenngoclong/data-sync).\n\n# Features\n\n-   Connects to a source and target database to perform the comparison.\n-   Can compare changes to both the schema and data, and generate valid SQL to update the target database to match the source.\n-   Allows you to ignore certain tables or fields during the comparison.\n-   Currently only works with PostgreSQL, but we plan to expand to other databases based on user demand in the future.\n\n## Using the extension\n\n### Step 1: Configuration\n\n\u003e On the first time, you need create the configuration.\n\u003e You can quickly create your configuration from [Data Sync Explorer](#generate-configuration-from-data-sync-explorer) or [Command Palette](#generate-configuration-from-command-palette).\n\n```jsonc\n// A Boolean variable indicating whether to include verbose log in migrate data.\n\"verbose\": boolean,\n\n// List of migrate pattern, multiple pattern can be defined.\n\"patterns\": {\n    // Your defined pattern\n    \"patternName\": {\n        // Your source database connection section\n        \"source\": {\n            \"user\": string,\n            \"password\": string,\n            \"host\": string,\n            \"database\": string,\n            \"port\": number,\n\n            // database connection string\n            \"connectionString\": string,\n\n            // passed directly to node.TLSSocket, supports all tls.connect options\n            \"ssl\": object,\n\n            // custom type parsers\n            \"types\": object,\n\n            // number of milliseconds before a statement in query will time out, default is no timeout\n            \"statement_timeout\": number,\n\n            // number of milliseconds before a query call will timeout, default is no timeout\n            \"query_timeout\": number,\n\n            // the name of the application that created this Client instance\n            \"application_name\": string,\n\n            // number of milliseconds to wait for connection, default is no timeout\n            \"connectionTimeoutMillis\": number,\n\n            // number of milliseconds a client must sit idle in the pool\n            \"idleTimeoutMillis\": number,\n\n            // maximum number of clients the pool should contain by default this is set to 10.\n            \"max\": object,\n\n            // default behavior is the pool will keep clients open \u0026 connected\n            \"allowExitOnIdle\": boolean,\n\n            // Number of milliseconds before terminating any session with an open idle transaction, default is no timeout\n            \"idle_in_transaction_session_timeout\": number\n        },\n\n        // Your target database connection section\n        \"target\": {\n            \"user\": string,\n            \"password\": string,\n            \"host\": string,\n            \"database\": string,\n            \"port\": number\n            // And other property you can defined (same as source)\n        },\n\n        // You diff options\n        \"diff\": {\n            // Auto format diff data (UNDER DEVELOPMENT)\n            \"format\": true,\n\n            // The table you want to diff changes.\n            \"tables\": [\n                {\n                    // The database table schema\n                    \"schema\": string,\n\n                    // The database table name\n                    \"name\": string,\n\n                    // Exclude one or more columns\n                    \"excludes\": Array\u003cstring\u003e,\n\n                    // Custom where query (.e.g customer_id = 'JHQMFFE8sJ')\n                    \"where\": string,\n\n                    // Custom order by column (.e.g iam_role_code, iam_policy_code)\n                    \"orderBy\": string,\n\n                    // Define columns you want get to compare, default all column\n                    \"columns\": Array\u003cstring\u003e,\n\n                    // Define primary keys of table, to check table row is unique\n                    \"primaryKeys\": Array\u003cstring\u003e\n                }\n            ]\n        },\n\n        // Your migrate options\n        \"migrate\": {\n            // No generate the insert record.\n            \"noInsert\": false,\n\n            // No generate the update record.\n            \"noUpdate\": false,\n\n            // No generate the delete record.\n            \"noDelete\": false,\n\n            // Action on no row affected when migrate data\n            \"noRowAffected\": \"ignore\" | \"log\" | \"warn\" | \"throw\",\n\n            // Action on multiple row affected when migrate data\n            \"multipleRowAffected\": \"ignore\" | \"log\" | \"warn\" | \"throw\"\n        }\n    }\n}\n```\n\n### Step 2: Analyze different data\n\n![Analyze Diff Data](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/analyze-diff-data.gif)\n\n### Step 3. Review changes\n\n![Review Changes](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/review-changes.gif)\n\n### Step 4. Review migrate file\n\n![Review Migrate File](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/review-migrate-file.gif)\n\n### Step 5. Apply changes\n\n![Apply Changes](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/apply-changes.gif)\n\n## Other\n\n### Revert changes\n\n![Revert Changes](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/revert-changes.gif)\n\n### Import migration data\n\n![Import Migration Data](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/import-migration-data.gif)\n\n### View process info\n\n![View Process Info](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/view-process-info.gif)\n\n### Quick open configuration\n\n![View Process Info](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/quick-open-config.gif)\n\n### Generate Configuration from Data Sync Explorer\n\n![From Data Sync Explorer](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/generate-config-from-explorer.gif)\n\n### Generate Configuration from Command Palette\n\n![From Command Palette](https://github.com/nguyenngoclongdev/cdn/raw/HEAD/images/data-sync/generate-config-from-command-palette.gif)\n\n## Feedback\n\nIf you discover a bug, or have a suggestion for a feature request, please\nsubmit an [issue](https://github.com/nguyenngoclongdev/vs-data-sync/issues).\n\n## LICENSE\n\nThis extension is licensed under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenngoclongdev%2Fvs-data-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnguyenngoclongdev%2Fvs-data-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenngoclongdev%2Fvs-data-sync/lists"}