topthink/think-migration是封装的phinx,这里放一下我
原版教程:https://book.cakephp.org/phinx/0/en/index.html (需科学上网)
中文教程:https://tsy12321.gitbooks.io/phinx-doc/
使用 php think migrate:create 创建时表名采用驼峰命名,比如Topic,CommonGroup则不会报错
SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘id’
think-migration会自动添加一个”id int(11) 自增”,所以不需要创建id字段