mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-28 03:34:32 -06:00
48 lines
903 B
PHP
48 lines
903 B
PHP
<?php
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
/**
|
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
|
*
|
|
* Class CreateSessionTable
|
|
*
|
|
*/
|
|
class CreateSessionTable extends Migration
|
|
{
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('sessions');
|
|
}
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create(
|
|
'sessions', function (Blueprint $table) {
|
|
$table->string('id')->unique();
|
|
$table->integer('user_id')->nullable();
|
|
$table->string('ip_address', 45)->nullable();
|
|
$table->text('user_agent')->nullable();
|
|
$table->text('payload');
|
|
$table->integer('last_activity');
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|