2016-12-27 157 views
0

我尝试迁移我的数据库,当我执行命令命令学说:迁移:迁移错误

php app/console doctrine:migrations:migrate xxxxxxxxxx 

它导致此消息

Migration xxxxxxx was executed but did not result in any SQL statements. 

有人能解释我thie消息?

回答

0

命令执行起来解决问题:

php app/console doctrine:migrations:execute xxxxxxxxxx up 
0

我想说这是因为你的迁移文件中没有SQL指令,但我不知道它的内容是否知道。你可以在这里复制/粘贴你的迁移文件的内容吗?

+0

没有,有一个SQL指令 $这个 - > addSql('CREATE TABLE axpLogger(ID INT AUTO_INCREMENT NOT NULL,USER_ID INT DEFAULT NULL,日期DATETIME NOT NULL,status_code INT NOT NULL,page_uri VARCHAR(255)DEFAULT NULL,异常LONGTEXT NOT NULL,ip VARCHAR(255)DEFAULT NULL,PRIMARY KEY(id))DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); –