How to add FOREIGN KEY constraint when creating a table? |
[eluser]mabasic[/eluser]
Hi all, I was inspired by the posts here and frustrated by codeigniter that it does not have abillity to add foreign keys using DBforge so I forked the repo and added it as a new feature. It only requires little code modifications to system folder. You can find the code here: https://github.com/DamexHr/CodeIgniter/t...reign_key/ Usage is simple Code: $this->dbforge->add_foreign_key(array('field' => 'language_id', |
Messages In This Thread |
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 02-10-2012, 12:59 AM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 02-10-2012, 11:50 PM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 02-11-2012, 01:32 AM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 02-11-2012, 03:24 AM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 02-11-2012, 05:46 PM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 04-18-2013, 05:32 AM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 04-20-2013, 12:24 AM
How to add FOREIGN KEY constraint when creating a table? - by El Forum - 04-20-2013, 01:56 AM
|