Update the sessions table (#1030)
* Update the sessions table * Add index on user_id
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Bring the sessions table in line with the latest
|
||||
*/
|
||||
class UpdateSessionsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->change()->primary();
|
||||
$table->index('user_id');
|
||||
$table->index('last_activity');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user