架构更改后Cakephp烘焙错误

时间:2015-08-24 03:25:39

标签: cakephp cakephp-3.0

我试图在数据库架构更改后重新生成所有脚手架,并获得异常$.ajax({ url: "~/getdata.php" , type: "POST", data: '', success : function(result) { var obj = jQuery.parseJSON(result); if(obj != '') { //$("#myTable tbody tr:not(:first-child)").remove(); $("#nsnt").empty(); $.each(obj, function(key, val) { var m = val["cnt"]; $('#nsnt').append( m ); }); } } });

$.ajax({ url: "~/getdata.php" , type: "POST", data: '' }).done(function(result) { var obj = jQuery.parseJSON(result); if(obj != '') { //$("#myTable tbody tr:not(:first-child)").remove(); $("#nsnt").empty(); $.each(obj, function(key, val) { var m = val["cnt"]; $('#nsnt').append( m ); }); }; }); 以前是一个表,但是已经更改为名为SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db01.address_types' doesn't exist in [/.../vendor/cakephp/cakephp/src/Database/Schema/Collection.php, line 130]的枚举,因此表格已经消失,它甚至会导致复数错误!蛋糕/烘焙从哪里获得旧模式?

1 个答案:

答案 0 :(得分:0)

为了将来参考,问题是我已经'备份'了一些带有'z'的旧表。前缀,以保持它们(以防万一),不知何故这些仍然被引用,所以一旦我删除它们,那些引用就不见了。糟糕:)