forked from s421507/eOSP2
50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateUsersTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('users', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('password', 100);
|
|
$table->string('name', 45);
|
|
$table->string('surname', 45);
|
|
$table->string('PESEL',11);
|
|
$table->string('phoneNumber', 9);
|
|
$table->string('email', 50)->unique();
|
|
$table->integer('fireStationID')->nullable();
|
|
$table->integer('functionID');
|
|
$table->integer('degreeID');
|
|
$table->string('number', 45)->nullable()->default(null);
|
|
$table->integer('statusID')->default(0);
|
|
$table->integer('deleted')->default(0);
|
|
$table->integer('creatorID')->nullable()->default(null);
|
|
$table->integer('changingID')->nullable()->default(null);
|
|
$table->boolean('confirmed')->default(0);
|
|
$table->string('confirmation_code')->nullable();
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('users');
|
|
}
|
|
}
|