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.

    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献