composer require topthink/think-migration=2.0.* 命令安装


查看是否安装成功 

 

    php think 命令

 

在项目根目录下床架database文件夹

 

 创建数据库表类首字母大写

 命令 php think migrate:create User 

会在database文件夹中(/database/migrateions/1234213_User.php)生成文件

固定方法

 

 

然后  php think migrate:run  生成数据库表

如果要修改 php think  migrate:rollback;  回滚数据库

详情 https://blog.csdn.net/Especial_/article/details/101771992