Settings
Hibernate settings for the integrator and the ExecutionOptions they map to. Settings in the registry refine the options passed in code.
Hibernate
hibernate.ddl_manager.*
An unknown key under this prefix is an error.
- hibernate.ddl_manager.enabled
- true runs the migration while the SessionFactory is built. Default false.
- hibernate.ddl_manager.adopt_existing_schema
- true adopts a matching database without history.
- hibernate.ddl_manager.approvals
- Comma-separated drop:<id>, rename-back:<id>, revert:<revision>, drop-unique:<signature>.
- hibernate.ddl_manager.accept_manual_migration
- Fingerprint of a target migrated by hand.
- hibernate.ddl_manager.lock_timeout_millis
- How long to wait for locks. Default 5000.
- hibernate.ddl_manager.statement_timeout_millis
- Limit per statement. Default 30000.
Code
ExecutionOptions
The same switches for the explicit call, plus the risk classes that may run at all.
- lockTimeoutMillis: Int = 5000
- Lock timeout.
- statementTimeoutMillis: Int = 30000
- Statement timeout.
- allowedRisks: Set[RiskLevel]
- Operation classes allowed to run: Safe, Locking, Destructive. All by default.
- adoptExistingSchema: Boolean = false
- Adopt a matching database without history.
- approvals: Set[Approval] = Set.empty
- Changes permitted beyond the default.
- acceptManualMigration: Option[String] = None
- Fingerprint of a target migrated by hand.
Entry points
HibernateSchemaMigration
The four calls of schema-integration.
- migrate(metadata, dataSource, options, backfills): MigrationResult
- Migrate synchronously; throws MigrationException on any problem.
- preview(metadata, dataSource, options, backfills, previewOptions): PreviewReport
- The read-only report of what migrate would do.
- exportTarget(metadata): String
- The target model as JSON, for the CLI.
- exportBackfills(metadata, backfills): String
- All backfills as JSON, for the CLI.