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 pnpm 下载element-plus
  • ¥15 解决编写PyDracula时遇到的问题
  • ¥15 有没有人能解决下这个问题吗,本人不会编程
  • ¥15 plotBAPC画图出错
  • ¥30 关于#opencv#的问题:使用大疆无人机拍摄水稻田间图像,拼接成tif图片,用什么方法可以识别并框选出水稻作物行
  • ¥15 Python卡尔曼滤波融合
  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥20 能提供一下思路或者代码吗