[英]How to define composite primary key using codeIgniter migrations?
i convert my database to migrations successfully, except the following line: 我将数据库成功转换为迁移,但以下行除外:
PRIMARY KEY (`key_id`,`user_id`);
Currently i doing it as: 目前我这样做是:
$this->dbforge->add_key('key_id,user_id',TRUE);
but no Luck. 但没有运气。 gives the following Error: 给出以下错误:
Error Number: 1072<p>Key column 'key_id,user_id' doesn't exist</p>
can anyone help? 有人可以帮忙吗? sorry for English Grammar and if i am not clear. 对不起,英语语法,如果我不清楚。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.