CodeIgniter Forums
dbforge with foreign keys - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: dbforge with foreign keys (/showthread.php?tid=25378)



dbforge with foreign keys - El Forum - 12-09-2009

[eluser]Unknown[/eluser]
Hi, I was wondering whether there was any way to specify foreign keys while defining columns with dbforge->add_field function besides altering the table manually with custom queries after the table is created. Thank you.


dbforge with foreign keys - El Forum - 12-10-2009

[eluser]Phil Sturgeon[/eluser]
Foreign Keys are not standard SQL and do not work with all systems, so as per AR principals there is no way to do it with nice syntax in DBForge. You will need to do it manually. :-(


dbforge with foreign keys - El Forum - 12-10-2009

[eluser]Unknown[/eluser]
Thank you.