public class MigrationTable extends Object
| Constructor and Description |
|---|
MigrationTable(MigrationConfig config,
Connection connection,
boolean checkState)
Construct with server, configuration and jdbc connection (DB admin user).
|
| Modifier and Type | Method and Description |
|---|---|
void |
createIfNeededAndLock()
Create the table is it does not exist.
|
List<LocalMigrationResource> |
ran()
Return the migrations that have been run.
|
boolean |
shouldRun(LocalMigrationResource localVersion,
LocalMigrationResource priorVersion)
Return true if the migration ran successfully and false if the migration failed.
|
int |
size()
Return the number of migrations in the DB migration table.
|
public MigrationTable(MigrationConfig config, Connection connection, boolean checkState)
public List<LocalMigrationResource> ran()
public int size()
public void createIfNeededAndLock() throws SQLException, IOException
Also holds DB lock on migration table and loads existing migrations.
SQLExceptionIOExceptionpublic boolean shouldRun(LocalMigrationResource localVersion, LocalMigrationResource priorVersion) throws SQLException
SQLExceptionCopyright © 2017. All rights reserved.