[keycloak-dev] more db schema changes

Marek Posolda mposolda at redhat.com
Tue Jul 22 04:04:41 EDT 2014


I've sent PR https://github.com/keycloak/keycloak/pull/545 with the fix. 
In case of MySQL it was just missing transaction commit in 
AbstractKeycloakRule.getUser, which caused that some tables were locked 
and hence was not possible to remove constraint

I've added few other fixes also for PostgreSQL to work and I've added 
@Column, @JoinColumn and @Table annotations to all other places where it 
wasn't yet, so now we should have control on all the names of columns 
and tables.

So ATM PostgreSQL and MySQL work again, I am going to try other DBs.

Marek

On 21.7.2014 15:24, Bill Burke wrote:
> Sorry, I know why you changed it.  I just don't know why it breaks MySQL...
>
> On 7/21/2014 4:28 AM, Stian Thorgersen wrote:
>> I changed it as I couldn't get the composite ids to work. Did I break something?
>>
>> ----- Original Message -----
>>> From: "Bill Burke" <bburke at redhat.com>
>>> To: keycloak-dev at lists.jboss.org
>>> Sent: Friday, 18 July, 2014 5:26:32 PM
>>> Subject: Re: [keycloak-dev] more db schema changes
>>>
>>> Nevermind.  Stian changed it already.  Not sure why now...
>>>
>>> On 7/18/2014 12:03 PM, Bill Burke wrote:
>>>> Ugh.  Might be the double @ManyToOne hack I had to do for auth link.
>>>>
>>>> On 7/18/2014 11:51 AM, Marek Posolda wrote:
>>>>> Hi,
>>>>>
>>>>> just wanted to point that all recent DB changes seem to break databases
>>>>> (or at least MySQL). Actually when running testsuite with MySQL, then at
>>>>> the end of some tests during Hibernate schema cleanup, it hangs. Just
>>>>> figured out that it's this SQL command which causes hang of MySQL: alter
>>>>> table AUTHENTICATION_LINK drop foreign key FK582E5612EF007A6;
>>>>>
>>>>> Actually not sure if it's related to compound primary key of
>>>>> AuthenticationLinkEntity or foreign key with UserEntity... Will look at
>>>>> it more on Monday, just wanted to point that databases doesn't work ATM.
>>>>>
>>>>> Marek
>>>>>
>>>>> On 17.7.2014 22:36, Bill Burke wrote:
>>>>>> * created @NamedQuery for every creatQuery we have
>>>>>> * Use @Column, @JoinColumn, and @JoinTable, and @Table everywhere.
>>>>>> names are uppercase with "_".  At least 10+ years ago, this was the
>>>>>> standard naming convention.
>>>>>> * CredentialEntity now has a generated String ID.  We will want to have
>>>>>> multiple TOTP entries in the future.
>>>>>>
>>>>>> Bill
>>>>>>
>>> --
>>> Bill Burke
>>> JBoss, a division of Red Hat
>>> http://bill.burkecentral.com
>>> _______________________________________________
>>> keycloak-dev mailing list
>>> keycloak-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>>



More information about the keycloak-dev mailing list