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()
void
setDataSource
(DataSource dataSource) Sets the finalDataSource
to use after migration is complete.void
Sets the finalJdbi
instance to use after migration is complete.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:DatabaseMigrator
Sets the finalDataSource
to use after migration is complete. Override to gain access to the underlyingDataSource
instead of theJdbi
instance.- Specified by:
setDataSource
in interfaceDatabaseMigrator
-
getJdbi
-
setJdbi
Description copied from interface:DatabaseMigrator
Sets the finalJdbi
instance 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:
setJdbi
in interfaceDatabaseMigrator
-