最近作项目,须要在某个数据表中增长索引,个人作法以下:1.在upgradeSchema.php增长addIndex方法和定义version2.在moudule.xml修改version3.执行php bin/magento setup:upgrade作完以上3步,基本就实现了索引的添加php