Skip to content

Commit 7cc1ccd

Browse files
committed
Update sessions migration
1 parent e98851b commit 7cc1ccd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

database/migrations/2016_04_05_142933_create_sessions_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
public function up()
1515
{
1616
Schema::create('sessions', function (Blueprint $table) {
17-
$table->string('id')->unique();
18-
$table->integer('user_id')->nullable();
17+
$table->string('id')->primary();
18+
$table->foreignId('user_id')->nullable()->index();
1919
$table->string('ip_address', 45)->nullable();
2020
$table->text('user_agent')->nullable();
21-
$table->text('payload');
22-
$table->integer('last_activity');
21+
$table->longText('payload');
22+
$table->integer('last_activity')->index();
2323
});
2424
}
2525

0 commit comments

Comments
 (0)