https://github.com/fugerit-org/db-compare
Tool for database schema comparison
https://github.com/fugerit-org/db-compare
Last synced: 25 days ago
JSON representation
Tool for database schema comparison
- Host: GitHub
- URL: https://github.com/fugerit-org/db-compare
- Owner: fugerit-org
- License: apache-2.0
- Created: 2024-07-17T06:12:15.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-03T23:32:34.000Z (12 months ago)
- Last Synced: 2025-06-04T08:09:48.727Z (about 1 month ago)
- Language: Java
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# db-compare
Simple helper to handle update / insert / delete in a SAFE mode.
[](https://github.com/fugerit-org/db-compare/blob/master/CHANGELOG.md)
[](https://mvnrepository.com/artifact/org.fugerit.java/db-compare)
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/fugerit-org/fj-universe/blob/main/CODE_OF_CONDUCT.md)
[](https://sonarcloud.io/summary/new_code?id=fugerit-org_db-compare)
[](https://sonarcloud.io/summary/new_code?id=fugerit-org_db-compare)[](https://universe.fugerit.org/src/docs/versions/java11.html)
[](https://universe.fugerit.org/src/docs/versions/java11.html)
[](https://universe.fugerit.org/src/docs/versions/maven3_9.html)## Quickstart
Add maven dependency :
```xml
org.fugerit.java
db-compare
${db-compare-version}
```Sample usage :
```java
try ( InputStream configIs = ...;
ConnectionFactoryCloseable cf1 = ...;
ConnectionFactoryCloseable cf2 = .. ) {
DBCompareConfig config = this.facade.readConfig( configIs );
String schema = "PUBLIC";
DBCompareOutput output = this.facade.compare( config, cf1, schema, cf2, schema );
// print include equals
log.info( "\nDiff (include equals)" );
DBCompareUtils.printDiff( output, true );
// print exclude equals
log.info( "\nDiff (exclude equals)" );
DBCompareUtils.printDiff( output, false );
}
```