Files
zh-chat-server/database/migrations/2014_10_12_000000_create_users_table.php
2022-11-01 16:39:45 +08:00

38 lines
884 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('username', 64)->unique();
$table->string('password')->nullable();
$table->string('mobile')->index()->nullable();
$table->string('email')->index()->nullable();
$table->string('mnemonic')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}