doucheng8471 2014-09-10 07:03
浏览 76

Codeigniter 2迁移运行最新版本

In codeigniter2 i have the following migration file (1 to 8).

When running the method $this->migration->latest() i have observed the following:

  1. While migration version is 0 (in migration table) , Only the first(1) migration and latest(8) will be executed and the migration version in the table will be updated to 8.

  2. While migration version is greater >= 1, all migration file from 1 to 8 will be executed. The migration version in the table will be updated to 8.

Q : Is that normal? Or I am missing something here? Thanks.

  • 写回答

1条回答 默认 最新

  • douquqiang1513 2017-02-28 07:41
    关注

    Yes thats normal.

    You may want to run migration per version like:

    $this->migration->version(1);
    $this->migration->version(2);
    etc..
    

    Running latest() will run all from current migration to the last.

    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大