首先执行命令 `php artisan make:migration create_table_testtable`
然后在database/migrations中找到文件
内容为
```
increments('id');
$table->string('name', 20);
// $table->timestamps();
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
$table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));
});
}
public function down()
{
Schema::dropIfExists('table_testtable');
}
}
```
然后执行php artisan migrate即可