dreljie602951 2012-12-21 14:26
浏览 19
已采纳

YII迁移历史未被保存到数据库中

I'm using YII 1.1.12. When I do:

yiic migrate

inside the protected folder of my application, I get told that there is a new migration to be applied. I answer "Yes" so that the migration would be applied. After a while, I get:

*** applied m121220_121256_initialize_database (time: 6.060s)
Migrated up successfully.

All is fine up to this point. Then when I type 'yiic migrate', instead of being told that there is no new migration, I get told that:

Yii Migration Tool v1.0 (based on Yii v1.1.12)

Total 1 new migration to be applied:
    m121220_121256_initialize_database

Apply the above migration? (yes|no) [no]:

WhenI check the tbl_migration table, the only thing in there is the base migration. There's nothing aboutinitialize_database.

Any ideas?

  • 写回答

2条回答 默认 最新

  • dtu72460 2013-02-16 15:23
    关注

    I realised the problem was that the sql commands I was running straight from PHPMyAdmin contained a transaction. When I removed the lines about transactions, the database row in the yii_migration table was inserted successfully. I'm not sure why this should be, but there it is.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog