phinx脚本创建复合索引

160 阅读1分钟

phinx数据库脚本迁移工具的使用:
blog.csdn.net/weixin_3969…

 public function change()
    {
        $wbrapplicantdataother = $this->table("wbrapplicantdataother");
        //建立索引
        $wbrapplicantdataother->addIndex(['webinarId', 'unitLeaveTime', 'unitAttendTime'], ['name' => 'index_wbrapplicantdataother_unitLeaveTime'])
            ->save();
    }