public class SchemaGenerator extends Object implements Work
DbIndexWork
.
Hibernate generate "not null" constraints for
columns that are added to existing tables and we don't want that.Modifier and Type | Class and Description |
---|---|
(package private) static class |
SchemaGenerator.CollectSqlTarget
Helper class used for collecting SQL statements generated by Hibernate
schema creation/update tools.
|
static class |
SchemaGenerator.Mode
The installation mode.
|
static class |
SchemaGenerator.SqlStatement |
Modifier and Type | Field and Description |
---|---|
private DbEngine |
dbEngine |
private Dialect |
dialect |
private List<String> |
ignoredSql |
private static org.slf4j.Logger |
log |
private org.hibernate.boot.Metadata |
metadata |
private SchemaGenerator.Mode |
mode |
private ProgressReporter |
progress |
Constructor and Description |
---|
SchemaGenerator(org.hibernate.boot.Metadata metadata,
Dialect dialect,
DbEngine dbEngine,
SchemaGenerator.Mode mode,
ProgressReporter progress)
Create a new schema generator.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(Connection connection) |
List<String> |
getIgnoredSql()
Get a list with the SQL statements that was ignored in the last run.
|
private static final org.slf4j.Logger log
private final org.hibernate.boot.Metadata metadata
private final Dialect dialect
private final DbEngine dbEngine
private final SchemaGenerator.Mode mode
private final ProgressReporter progress
public SchemaGenerator(org.hibernate.boot.Metadata metadata, Dialect dialect, DbEngine dbEngine, SchemaGenerator.Mode mode, ProgressReporter progress)
metadata
- Information about current configurationdialect
- The dialect of the database we are connecting todbEngine
- The DbEngine for the database we are connecting tomode
- The installation modeprogress
- An optional progress reporterpublic void execute(Connection connection) throws SQLException
execute
in interface Work
SQLException