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 TypeMethodDescriptionorg.jdbi.v3.core.JdbigetJdbi()voidsetDataSource(DataSource dataSource) Sets the finalDataSourceto use after migration is complete.voidsetJdbi(org.jdbi.v3.core.Jdbi jdbi) Sets 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
public org.jdbi.v3.core.Jdbi getJdbi() -
setJdbi
public void setJdbi(org.jdbi.v3.core.Jdbi jdbi) 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
-