added class index to reports/widgets

This commit is contained in:
Denis Duliçi 2021-04-01 11:48:11 +03:00
parent 97d7abf13a
commit e62504a546
3 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace App\Listeners\Update\V21;
use App\Abstracts\Listeners\Update as Listener;
use App\Events\Install\UpdateFinished as Event;
use Illuminate\Support\Facades\Artisan;
class Version219 extends Listener
{
const ALIAS = 'core';
const VERSION = '2.1.9';
/**
* Handle the event.
*
* @param $event
* @return void
*/
public function handle(Event $event)
{
if ($this->skipThisUpdate($event)) {
return;
}
Artisan::call('migrate', ['--force' => true]);
}
}

View File

@ -29,6 +29,7 @@ class Event extends Provider
'App\Listeners\Update\V21\Version210',
'App\Listeners\Update\V21\Version213',
'App\Listeners\Update\V21\Version218',
'App\Listeners\Update\V21\Version219',
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\Auth\Login',

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CoreV219 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('reports', function (Blueprint $table) {
$table->index('class');
});
Schema::table('widgets', function (Blueprint $table) {
$table->index('class');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}