为什么添加字段要新增迁移文件?直接在 create_users_table 里面加字段不行吗?
如果我要添加 users 表的字段是不是可以直接在 database/migrations/2014_10_12_000000_create_users_table.php 里修改不用去新建迁移文件?
.
.
.
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
.
.
.
推荐文章: