Package com.tccc.kos.commons.db
Class BaseDatabaseMigrator
java.lang.Object
com.tccc.kos.commons.db.BaseDatabaseMigrator
- All Implemented Interfaces:
DatabaseMigrator
Base class for database migration.
- Since:
- 1.0
- Version:
- 2024-02-16
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetJdbi()voidsetDataSource(DataSource dataSource) Sets the finalDataSourceto use after migration is complete.voidSets the finalJdbiinstance to use after migration is complete.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.db.DatabaseMigrator
getCurrentSchema, getMinimumMigrationSchema, getMinimumRetentionSchema, migrateToSchema, migrateToSchema, purgeNewerSchema
-
Constructor Details
-
BaseDatabaseMigrator
public BaseDatabaseMigrator()
-
-
Method Details
-
getDataSource
-
setDataSource
Description copied from interface:DatabaseMigratorSets the finalDataSourceto use after migration is complete. Override to gain access to the underlyingDataSourceinstead of theJdbiinstance.- Specified by:
setDataSourcein interfaceDatabaseMigrator
-
getJdbi
-
setJdbi
Description copied from interface:DatabaseMigratorSets the finalJdbiinstance to use after migration is complete. Override to gain access to the final Jdbi instance if the migrator is also the DAO object.- Specified by:
setJdbiin interfaceDatabaseMigrator
-