2019-07-11 23:55:51 +02:00
|
|
|
<?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');
|
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-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');
|
|
|
|
}
|
|
|
|
}
|