开发者

New Column in Doctrine / CodeIgniter app produces Column not found: 1054 Unknown column error

开发者 https://www.devze.com 2023-04-06 17:12 出处:网络
Doctrine_Connection_Mysql_Exception [ 42 ]: SQLSTATE[42S22]: Column not found: 1054 Unknown column \'alloc开发者_如何学Cation_rule_number\' in \'field list\'

Doctrine_Connection_Mysql_Exception [ 42 ]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'alloc开发者_如何学Cation_rule_number' in 'field list'

I have the above error after adding a new column to my table manually via mysql command prompt. I have traced it down to synchronizeWithArray in my controller - for some reason in my code igniter controller

$this->_table->columns

is missing the new column I added so synchronizeWithArray is failing. I know that it's in the POST data so I'm not sure what part of Doctrine has the old table definition.

if ($is_update) { $this->license->synchronizeWithArray($this->tmp_record); }

Any ideas why would this happen or how to diagnose?


I forgot to add the same column to the license_versions table. I figured it out by checking the MySQL query log, which was invaluable in pointing out that exactly how it was trying to modify the wrong table!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号