Thanks for your interest in contributing! This document covers everything you need to get started.
- Rust 1.75 or later
- PostgreSQL 12+ (for integration tests)
- Docker (optional, for running test databases)
git clone https://github.com/rekurt/dbdiff.git
cd dbdiff
cargo build
cargo testdocker run -d --name dbdiff-test \
-p 5432:5432 \
-e POSTGRES_PASSWORD=test \
-e POSTGRES_DB=dbdiff_test \
postgres:16
# Run integration tests
DATABASE_URL=postgres://postgres:test@localhost/dbdiff_test cargo test- Run
cargo fmtbefore committing - Run
cargo clippy -- -D warningsand fix all warnings - Follow Rust API Guidelines
We use Conventional Commits:
feat: add MySQL driver support
fix: handle quoted identifiers in SQL parser
docs: update installation instructions
test: add integration tests for index diff
refactor: extract column normalization logic
- Fork the repository and create a feature branch from
main - Make your changes with clear, focused commits
- Add or update tests for your changes
- Ensure
cargo test,cargo clippy, andcargo fmt --checkall pass - Open a PR with a clear description of what and why
To add support for a new database, implement a loader in src/loader/:
- Create
src/loader/yourdb.rs - Implement a
pub async fn load(dsn: &str) -> Result<Schema, DbDiffError>function - Add detection logic in
src/loader/mod.rs - Add integration tests in
tests/
See src/loader/postgres.rs as a reference implementation.
- Use the bug report template for bugs
- Use the feature request template for ideas
By contributing, you agree that your contributions will be licensed under the MIT License.