lavarel 怎么给某张已经生成的表增加字段
需要全部reset然后修改migrations文件再migrate吗?
lavarel 怎么给某张已经生成的表增加字段
需要全部reset然后修改migrations文件再migrate吗?
假设是users表
php artisan make:migration add_votes_to_users_table --table=users
加votes字段
Schema::table('users', function ($table) {
$table->bigInteger('votes');
});最后
php artisan migrate
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号