2018-09-15 17:24:59 +02:00
|
|
|
<?php
|
|
|
|
|
2018-10-24 13:35:31 +02:00
|
|
|
namespace Engelsystem\Migrations;
|
|
|
|
|
2018-09-15 17:24:59 +02:00
|
|
|
use Engelsystem\Database\Migration\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
|
|
|
class CreateSessionsTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migration
|
|
|
|
*/
|
|
|
|
public function up(): void
|
|
|
|
{
|
|
|
|
$this->schema->create('sessions', function (Blueprint $table): void {
|
|
|
|
$table->string('id')->unique();
|
|
|
|
$table->text('payload');
|
2018-09-16 14:08:09 +02:00
|
|
|
$table->dateTime('last_activity')->useCurrent();
|
2018-09-15 17:24:59 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migration
|
|
|
|
*/
|
|
|
|
public function down(): void
|
|
|
|
{
|
|
|
|
$this->schema->dropIfExists('sessions');
|
|
|
|
}
|
|
|
|
}
|