@ApplicationScoped public class CDILiquibase extends Object implements javax.enterprise.inject.spi.Extension
db-changelog.xml
from the classpath and apply it against
myDataSource
.
Various producers methods are required to resolve the dependencies, i.e.
{@code public class CDILiquibaseProducer {
Modifier and Type | Field and Description |
---|---|
protected CDILiquibaseConfig |
config |
Constructor and Description |
---|
CDILiquibase() |
Modifier and Type | Method and Description |
---|---|
protected Database |
createDatabase(Connection c)
Subclasses may override this method add change some database settings such as
default schema before returning the database object.
|
protected Liquibase |
createLiquibase(Connection c) |
boolean |
isInitialized() |
boolean |
isUpdateSuccessful() |
void |
onStartup() |
protected void |
performUpdate() |
@Inject protected CDILiquibaseConfig config
public boolean isInitialized()
public boolean isUpdateSuccessful()
@PostConstruct public void onStartup()
protected void performUpdate() throws LiquibaseException
LiquibaseException
protected Liquibase createLiquibase(Connection c) throws LiquibaseException
LiquibaseException
protected Database createDatabase(Connection c) throws DatabaseException
c
- DatabaseFactory
.DatabaseException
Copyright © 2023 Liquibase.org. All rights reserved.