[eluser]Genuine Scope[/eluser]
How to write foreign key relationships for tables in Codeigniter database migration script?
I have created tables.But now I need to establish foreign key constrains like following sql script.
Code:
ALTER TABLE `sprint`
ADD CONSTRAINT `sprint_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON DELETE CASCADE ON UPDATE NO ACTION;