{"id":28960334,"url":"https://github.com/loic-simon/comdab","last_synced_at":"2026-04-07T17:01:03.892Z","repository":{"id":300617103,"uuid":"989649085","full_name":"loic-simon/comdab","owner":"loic-simon","description":"Python library to inspect and compare database schemas","archived":false,"fork":false,"pushed_at":"2025-08-16T18:33:32.000Z","size":160,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T09:16:26.641Z","etag":null,"topics":["alembic","database","database-schema","sqlalchemy"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/comdab","language":"Python","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/loic-simon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2025-05-24T14:36:25.000Z","updated_at":"2025-08-25T13:58:33.000Z","dependencies_parsed_at":"2025-06-22T18:49:48.365Z","dependency_job_id":"0491da7c-76b2-4971-acbf-0df03f2b9959","html_url":"https://github.com/loic-simon/comdab","commit_stats":null,"previous_names":["loic-simon/comdab"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/loic-simon/comdab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fcomdab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fcomdab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fcomdab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fcomdab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loic-simon","download_url":"https://codeload.github.com/loic-simon/comdab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fcomdab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["alembic","database","database-schema","sqlalchemy"],"created_at":"2025-06-24T01:12:34.867Z","updated_at":"2026-04-07T17:01:03.839Z","avatar_url":"https://github.com/loic-simon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# comdab — Compare Database Schemas\n\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comdab)](https://pypi.org/p/comdab)\n[![PyPI - Version](https://img.shields.io/pypi/v/comdab)](https://pypi.org/p/comdab)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/loic-simon/comdab/test.yml?label=tests)](https://github.com/loic-simon/comdab/actions/workflows/test.yml)\n[![Read the Docs](https://img.shields.io/readthedocs/comdab)](https://comdab.readthedocs.io)\n![PyPI - Types](https://img.shields.io/pypi/types/comdab)\n\n_comdab_ allows you to compare in depth two database schemas to find\nall differences: missing columns, different nullabilities or defaults,\nslight changes in function or triggers definitions...\n\n\u003e [!WARNING]\n\u003e\n\u003e _comdab_ is still in development, only tested with PostgreSQL 14 to date.\n\u003e\n\u003e All feedback and contributions are welcome!\n\n## Installation\n\nUse [pip](https://pip.pypa.io) to install comdab:\n\n```bash\npip install comdab\n```\n\n### Requirements\n\n- Python `\u003e= 3.12`\n- [sqlalchemy](https://pypi.org/project/sqlalchemy) `\u003e= 2.0`\n- [pydantic](https://pypi.org/project/pydantic) `\u003e= 2.0`\n\n## Goals\n\n_comdab_ is especially useful in combination with a migration tool like\n[Alembic](https://alembic.sqlalchemy.org), to make sure that applying a\nmigration to an existing database\nand creating a new database from scratch produce **the exact same schema**.\n\nIndeed, while migration tools can auto-detect model changes and write\nautomatically the migrations to apply to pre-existing databases, it does not\ncover the whole schema complexity, and does not prevent human errors (like\nmodifying the model without re-generating migrations, or manually editing\nmigrations in a slightly wrong way...)\n\nThis may cause dangerous and hard to spot bugs, especially if your unit tests\nand CI run on a fresh database created from the Python-written model, and not\non pre-existing databases with the new migration applied.\n\nBy running _comdab_, you can ensure the two are the nearly-exact same.\n\n_comdab_ stands on the shoulders of the [SQLAlchemy](https://sqlalchemy.org)\nlibrary, used to connect to the database and for most of schema introspection.\n\n## Usage\n\n```py\nfrom comdab import compare_databases\nfrom sqlalchemy import create_engine\n\nengine_1 = create_engine(\"postgresql://user:pass@host/foo\")\nengine_2 = create_engine(\"postgresql://user:pass@host/bar\")\n\nwith engine_1.connect() as left_conn, engine_2.connect() as right_conn:\n    reports = compare_databases(left_conn, right_conn)\n\nif reports:\n    print(\"❌ Database schemas are different:\", reports)\nelse:\n    print(\"✅ Database schemas are the same!\")\n```\n\nSee [documentation](https://comdab.readthedocs.io) for configuration and other details.\n\n## Contributing\n\nIssues and pull requests are welcome!\n\n## License\n\nThis work is shared under [the MIT license](LICENSE).\n\n@ 2025 Loïc Simon ([loic.simon@espci.org](mailto:loic.simon@espci.org))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floic-simon%2Fcomdab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floic-simon%2Fcomdab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floic-simon%2Fcomdab/lists"}