48 lines
1.4 KiB
PHP
Executable File
48 lines
1.4 KiB
PHP
Executable File
<?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->bigIncrements('id');
|
|
$table->string('first_name', 60);
|
|
$table->string('last_name', 60)->nullable();
|
|
$table->string('color', 20)->nullable();
|
|
$table->string('user_char', 10)->nullable();
|
|
$table->string('username', 50)->unique();
|
|
$table->string('email', 50)->unique();
|
|
$table->string('phone', 15)->nullable();
|
|
$table->tinyInteger('sex')->default(0)->nullable();
|
|
$table->text('about')->nullable();
|
|
$table->date('date_of_birth')->nullable();
|
|
$table->string('photo_path', 255)->nullable();
|
|
$table->string('banner_path', 255)->nullable();
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
$table->string('password');
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('users');
|
|
}
|
|
}
|