summaryrefslogtreecommitdiff
path: root/db/migrations/2018_09_11_000000_create_sessions_table.php
blob: 33a9f5693ba35db7a7d0c3717d996232c15fc0be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

use Engelsystem\Database\Migration\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateSessionsTable extends Migration
{
    /**
     * Run the migration
     */
    public function up()
    {
        $this->schema->create('sessions', function (Blueprint $table) {
            $table->string('id')->unique();
            $table->text('payload');
            $table->dateTime('last_activity')->useCurrent();
        });
    }

    /**
     * Reverse the migration
     */
    public function down()
    {
        $this->schema->dropIfExists('sessions');
    }
}