p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
Other
362 stars 65 forks source link

Update database changesets to support MariaDB #112

Closed m-bull closed 11 months ago

m-bull commented 11 months ago

Fixes https://github.com/p2-inc/keycloak-orgs/issues/111.

Adds mariadb to the DBMS types for which to run "mysql-style" migrations.

ETA: Tested by hotfixing phasetwo-keycloak:21.1.2.1688664025 with the .jar built from this branch against MariaDB-10.6.9. Migrations complete.

xgp commented 11 months ago

@m-bull Thanks for the PR! This looks good. We had a problem with the mysql migration changes that were related to existing Liquibase checksums not matching because of a syntax change in the migration files that caused it to generate a new checksum. Can you do the following and post your results:

  1. Pick a database that isn't mariadb (e.g. postgres)
  2. Run a previous version of this against that database
  3. Run the patched version of this against that database. The goal of this is to prevent migration problems for existing users because of a change in the checksum. Assuming that runs without issue, we can merge this.
m-bull commented 11 months ago

Thanks for the quick response @xgp - tested using the compose files from here.

Can successfully go from 21.0.2.1680207588 to 21.1.2.1688664025 (with the above patch) with no complaints.