Interface IDataSourceInfo
- All Known Implementing Classes:
DataSourceInfoSQLite
public interface IDataSourceInfo
Represents the data needed to connect to a DataSource.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe type of the DataSource. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe location of the migration files for the DataSource. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidBacks up the database.default voidconfigureFlyway(org.flywaydb.core.api.configuration.FluentConfiguration config) Updates the Flyway configuration with configuration specific to the DataSource.Gets the DataSource.default StringGets the location of the migration files for the DataSource.getType()Gets the type of the DataSource.
-
Field Details
-
DB_MIGRATION_LOCATION
The location of the migration files for the DataSource.This is a format string that takes the type of the DataSource as an argument.
To get the final location for the implementation, use
getMigrationFilesLocation()instead.- See Also:
-
-
Method Details
-
getDataSource
DataSource getDataSource()Gets the DataSource.- Returns:
- The DataSource.
-
getMigrationFilesLocation
Gets the location of the migration files for the DataSource.- Returns:
- The location of the migration files for the DataSource.
-
getType
IDataSourceInfo.Type getType()Gets the type of the DataSource.- Returns:
- The type of the DataSource.
-
backupDatabase
default void backupDatabase()Backs up the database.This method is optional for implementations.
On implementations that do not support this method, this method should do nothing.
-
configureFlyway
default void configureFlyway(org.flywaydb.core.api.configuration.FluentConfiguration config) Updates the Flyway configuration with configuration specific to the DataSource.By default, this method sets the DataSource and the location of the migration files.
- Parameters:
config- The Flyway configuration to update.
-