php artisan migrate
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUuserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('uuser', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('name',20)->comment('用户名');
$table->string('password',50)->comment('用户密码');
$table->integer('age')->nullable()->comment('年龄');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('uuser');
}
}