firefly-iii/database/migrations/2014_07_09_204843_create_session_table.php

45 lines
874 B
PHP
Raw Normal View History

2015-02-05 21:41:00 -06:00
<?php
use Illuminate\Database\Migrations\Migration;
2016-02-11 22:29:41 -06:00
use Illuminate\Database\Schema\Blueprint;
2015-02-05 21:41:00 -06:00
/**
* @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()
{
2016-02-05 08:41:40 -06:00
Schema::create(
2016-02-11 22:29:41 -06:00
'sessions', function (Blueprint $table) {
2015-02-05 21:41:00 -06:00
$table->string('id')->unique();
2016-02-05 00:55:36 -06:00
$table->integer('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
2015-02-05 21:41:00 -06:00
$table->text('payload');
$table->integer('last_activity');
2016-02-05 08:41:40 -06:00
}
);
2015-02-05 21:41:00 -06:00
}
}