Page 1 of 1

Foreign Key and Unique Key at the same time

Posted: 2013-10-19 09:21
by AhmedBR
Problem:
AppGini does not allow a field to be Foreign Key and Unique Key at the same time.
Unique.gif
Unique.gif (7.57 KiB) Viewed 4975 times
Solution:
Set the field as Foreign in AppGini
Set the field as Unique in PhpMyAdmin

Problem solved.

Re: Foreign Key and Unique Key at the same time

Posted: 2013-10-20 17:05
by a.gneady
I'll modify this restriction in future releases ... notice that this (foreign key AND unique) would create a one-to-one relation between the two tables rather than one-to-many.

Re: Foreign Key and Unique Key at the same time

Posted: 2013-10-20 18:01
by AhmedBR
Thanks for alerting about this.
But in my case it is exactly what I need to do in this table. ;)