2014_10_12_000000_create_users_table.php 1.12 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?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()
    {
Jacob Priddy's avatar
Jacob Priddy committed
16
        // This table holds the user objects in the system
17
18
        Schema::create('users', function (Blueprint $table) {
            $table->bigIncrements('id');
Jacob Priddy's avatar
Jacob Priddy committed
19
20
21
            $table->string('first_name');
            $table->string('last_name');
            $table->string('display_name');
22
            $table->string('emplid')->nullable();
23
            $table->string('email')->unique();
Jacob Priddy's avatar
Jacob Priddy committed
24
            // hashed
25
            $table->string('password')->nullable()->default(null);
Jacob Priddy's avatar
Jacob Priddy committed
26
            // hashed
27
            $table->string('doorcode')->nullable()->default(null);
28
            $table->timestamp('expires_at')->nullable();
29
            $table->timestamps();
Jacob Priddy's avatar
Jacob Priddy committed
30
            $table->softDeletes();
31
32
33
34
35
36
37
38
39
40
41
42
43
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}