Cake模式创建--file无效

时间:2013-10-07 09:56:41

标签: php cakephp terminal

我正在尝试回滚到名为 backup_7_10_2013.php的备份架构文件

当我运行时,我在 / Applications / MAMP / htdocs / cakecms / 目录中

cake schema create - file backup_7_10_2013

我收到以下错误:

无法加载所选的架构。试图加载: 文件:/Applications/MAMP/htdocs/cakecms/Config/Schema/backup_7_10_2013.php 名称:Cakecms

backup_7_10_2013.php文件的内容为:

<?php 
class Backup7102013Schema extends CakeSchema {

    public function before($event = array()) {
        return true;
    }

    public function after($event = array()) {
    }

    public $posts = array(
        'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
        'title' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
        'body' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
        'created' => array('type' => 'datetime', 'null' => false, 'default' => null),
        'modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
        'published' => array('type' => 'datetime', 'null' => false, 'default' => null),
        'indexes' => array(
            'PRIMARY' => array('column' => 'id', 'unique' => 1)
        ),
        'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
    );

}

0 个答案:

没有答案
相关问题