JPA spi example added (#11110)
* JPA spi example added Added: how to configure JPA migration * Update db.adoc * Update configuration-provider.adoc moved JPA config to db.adoc * Update docs/guides/src/main/server/configuration-provider.adoc Co-authored-by: Stian Thorgersen <stian@redhat.com>
This commit is contained in:
parent
ac6ee54455
commit
ae54fa8dd2
1 changed files with 17 additions and 0 deletions
|
@ -136,4 +136,21 @@ Keycloak uses XA transactions and the appropriate database drivers by default. C
|
|||
|
||||
Keycloak automatically chooses the appropriate JDBC driver for your vendor.
|
||||
|
||||
== Setting JPA provider configuration option for migrationStrategy
|
||||
|
||||
To setup the JPA migrationStrategy (manual/update/validate) you should setup JPA provider as follows:
|
||||
|
||||
.Setting the `migration-strategy` for the `quarkus` provider of the `connections-jpa` SPI
|
||||
<@kc.start parameters="--spi-connections-jpa-quarkus-migration-strategy=manual"/>
|
||||
|
||||
If you want to get a SQL file for DB initialization, too, you have to add this additional SPI initializeEmpty (true/false):
|
||||
|
||||
.Setting the `initialize-empty` for the `quarkus` provider of the `connections-jpa` SPI
|
||||
<@kc.start parameters="--spi-connections-jpa-quarkus-initialize-empty=false"/>
|
||||
|
||||
In the same way the migrationExport to point to a specific file and location:
|
||||
|
||||
.Setting the `migration-export` for the `quarkus` provider of the `connections-jpa` SPI
|
||||
<@kc.start parameters="--spi-connections-jpa-quarkus-migration-export=<path>/<file.sql>"/>
|
||||
|
||||
</@tmpl.guide>
|
||||
|
|
Loading…
Reference in a new issue