public interface MigrationExecutor
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
canExecuteInTransaction()
Whether the execution can take place inside a transaction.
|
void |
execute(Context context)
Executes the migration this executor is associated with.
|
void execute(Context context) throws SQLException
context - The context to use to execute the migration against the DB.SQLException - when the execution of a statement failed.boolean canExecuteInTransaction()
true.
This however makes it possible to execute certain migrations outside a transaction. This is useful for databases
like PostgreSQL and SQL Server where certain statement can only execute outside a transaction.true if a transaction should be used (highly recommended), or false if not.Copyright © 2022. All rights reserved.