We’re glad to announce the new release of the guttenbase, the data base migration framework. The main purpose of this framework is to support highly configurable migrations between different (heterogenous) RDBMS, such as DB2, MySQL, PostgreSQL, Oracle, etc.
Among various fixes and enhanced documentation the code base has been ported to Kotlin.
While there are some existing tools that allow you to copy databases, they are mostly limited to a special purpose. guttenbase in contrast is a framework focusing on the migration process, which may be influenced programmatically via so called hints. There are hints to influence batch sizes, transform the data, alter columns type, etc.
Example
To program a database migration can be as simple as:
repo.addConnectionInfo(SOURCE, MySQLConnectionInfo());
repo.addConnectionInfo(TARGET, MSSQLConnectionInfo());
repo.addConnectorHint(TARGET, object : MaxNumberOfDataItemsHint() {
override val value: MaxNumberOfDataItems
get() = MaxNumberOfDataItems {
2000 // MSSQL only supports 2100
}
})
DropTablesTool(repo).dropTables(TARGET)
CopySchemaTool(repo).copySchema(SOURCE, TARGET)
DefaultTableCopyTool(repo).copyTables(SOURCE, TARGET)
CheckEqualTableDataTool(repo).checkTableData(SOURCE, TARGET)
guttenbase is hosted at GitHub.
You must log in to post a comment.