search

Home  >  Q&A  >  body text

Keycloak 18: Guide to setting up a database migration strategy manually

According to the Keycloak documentation - Upgrade section (Upgrade), using --spi-connections-jpa-default-migration-strategy=manual will write all the necessary queries required for database migration to the SQL file, and exit the server.

I have tried configuring this as an inline parameter and tried adding it to the keycloak.conf file, but when I start the server it still automatically migrates the database and starts.

Did I miss something? Or is there any other way to do this?

Also, what is the default location available once this SQL file is created?

P粉798010441P粉798010441245 days ago428

reply all(1)I'll reply

  • P粉311563823

    P粉3115638232024-03-27 09:30:54

    Look at PR https://github.com/keycloak/keycloak/pull/ 11110

    It's named differently, instead of using the "default" provider, it uses "quarkus":

    --spi-connections-jpa-quarkus-migration-strategy=Manual”

    May be changed in the future based on comments.

    Updated due to anticipated changes! ! !

    Now the final spi name has "legacy", please refer to https://www.keycloak.org/server/db

    --spi-connections-jpa-Old version-migration-strategy=manual

    reply
    0
  • Cancelreply