2019-07-11 23:55:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
2019-10-06 02:15:16 +02:00
|
|
|
class CreateUsersTable extends Migration
|
2019-07-11 23:55:51 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('users', function (Blueprint $table) {
|
|
|
|
$table->increments('id');
|
2019-09-09 03:19:59 +02:00
|
|
|
$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);
|
2019-10-02 18:45:08 +02:00
|
|
|
$table->boolean('confirmed')->default(0);
|
|
|
|
$table->string('confirmation_code')->nullable();
|
2019-07-11 23:55:51 +02:00
|
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
|
|
$table->rememberToken();
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('users');
|
|
|
|
}
|
|
|
|
}
|