firefly-iii/database/migrations/2014_07_09_204843_create_session_table.php
2016-02-05 15:41:40 +01:00

44 lines
822 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
/**
* @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 ($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');
}
);
}
}