Welcome Guest, Not a member yet? Register   Sign In
Database Migration coe - How to write foreign key relationships for tables
#1

[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;




Theme © iAndrew 2016 - Forum software by © MyBB