84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
laravel中执行 php artisan migrate 后数据库中也插入数据但是我现在想修改表的结构 比如想为 title 字段加上一个默认值为0撤回的话数据就没了 如何能保证数据库数据还在又可以修改数据表呢
ps(我试过如果增加一个字段可以再创建一个migration 但是修改字段信息发现就不行了)
欢迎选择我的课程,让我们一起见证您的进步~~
Schema::table('users', function ($table) { $table->string('title')->default('1')->change(); });
https://laravel-china.org/doc...
https://laravel-china.org/doc...