Files
zh-chat-server/database/migrations/2014_10_12_000000_create_users_table.php
2022-11-01 11:07:41 +08:00

40 lines
963 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('phone')->nullable();
$table->string('email')->nullable();
$table->string('mnemonic')->nullable();
$table->boolean('privacy')->default(1)->index();
$table->rememberToken();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}