create、dropをオーバライドして、何もしない様にする

http://blog.ne2ma2.com/archives/304

テーブルの削除は律儀にやってくれるので、削除されないようにする(もしくは毎回テーブルを作る)。

  • /path/to/cake/console/libs/tasks/model.php
% diff -uBb model.php.org model.php
--- model.php.org       2009-02-17 11:17:04.000000000 +0900
+++ model.php   2009-02-17 11:16:58.000000000 +0900
@@ -919,6 +919,10 @@
                }
                $records = join(",\n", $records);
                $out .= "\tvar \$records = array(array(\n$records\n\t\t\t));\n";
+        
+        $out .= "\tfunction create(){\n \t\treturn false;\n \t}\n\n \tfunction drop(){\n \t\treturn false;\n \t}\n";
+        
+        
                $out .= "}\n";
                $path = TESTS . DS . 'fixtures' . DS;
                if (isset($this->plugin)) {