Foreign Key and Unique Key at the same time

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Foreign Key and Unique Key at the same time

Post by AhmedBR » 2013-10-19 09:21

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 3997 times
Solution:
Set the field as Foreign in AppGini
Set the field as Unique in PhpMyAdmin

Problem solved.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Foreign Key and Unique Key at the same time

Post by a.gneady » 2013-10-20 17:05

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.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Foreign Key and Unique Key at the same time

Post by AhmedBR » 2013-10-20 18:01

Thanks for alerting about this.
But in my case it is exactly what I need to do in this table. ;)
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

Post Reply