p2-inc / keycloak-orgs

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

#74: Set length of USER_ORGANIZATION_ROLE_MAPPING.ROLE_ID to 36 to match ForeignKey ORGANIZATION_ROLE.ID #75

Closed Panickev closed 1 year ago

Panickev commented 1 year ago

Fixes #74

Panickev commented 1 year ago

I'm not really familliar with this so Im not sure if I've done it correctly. I've added jpa-changelog-phasetwo-20230517.xml for the data-migration of the column length.

xgp commented 1 year ago

I think this is fine. We need to run regression tests on all the DBs we support, just to make sure, but I'll merge it after we do that. Thank you!

Panickev commented 1 year ago

I was just looking through the datamigrations and I found this: https://github.com/p2-inc/keycloak-orgs/pull/57

This seems to do the same thing I'm trying to do, set ROLE_ID to VARCHAR(36)

When I run keycloak and I look in the DATABASECHANGELOG_ORGANIZATI I do not see the META-INF/jpa-changelog-phasetwo-20211206.xml fiel as ran. I use quay.io/phasetwo/phasetwo-keycloak:21.0.1.1679927321. Is this the correct one?

xgp commented 1 year ago

Thanks for looking into this. If you haven't already tested/validated against the most recent tag 21.1.1.1683924709, please do that and see if it fixes your problem. @grinay contributed mssql support recently, so it will not be in earlier tags.

Panickev commented 1 year ago

Ah ye sthat version does seem to work. Thanks! I will close this MR.