diff --git a/app/Abstracts/Commands/Module.php b/app/Abstracts/Commands/Module.php
index d995f505e..35f4d49b7 100644
--- a/app/Abstracts/Commands/Module.php
+++ b/app/Abstracts/Commands/Module.php
@@ -56,7 +56,6 @@ abstract class Module extends Command
ModelHistory::create([
'company_id' => $this->company_id,
'module_id' => $this->model->id,
- 'category' => $this->module->get('category'),
'version' => $this->module->get('version'),
'description' => trans('modules.' . $action, ['module' => $this->alias]),
]);
diff --git a/app/Console/Stubs/Modules/json.stub b/app/Console/Stubs/Modules/json.stub
index ced9ddb44..4f9b5b754 100644
--- a/app/Console/Stubs/Modules/json.stub
+++ b/app/Console/Stubs/Modules/json.stub
@@ -2,7 +2,6 @@
"alias": "$ALIAS$",
"icon": "fa fa-cog",
"version": "1.0.0",
- "category": "accounting",
"active": 1,
"providers": [
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\Event",
diff --git a/app/Http/Controllers/Install/Updates.php b/app/Http/Controllers/Install/Updates.php
index 841a16da6..e4b1cabb0 100644
--- a/app/Http/Controllers/Install/Updates.php
+++ b/app/Http/Controllers/Install/Updates.php
@@ -39,7 +39,6 @@ class Updates extends Controller
$m = new \stdClass();
$m->name = $row->getName();
$m->alias = $row->get('alias');
- $m->category = $row->get('category');
$m->installed = $row->get('version');
$m->latest = $updates[$alias];
diff --git a/app/Http/Controllers/Modules/Item.php b/app/Http/Controllers/Modules/Item.php
index 46e8dbc65..9fa93887b 100644
--- a/app/Http/Controllers/Modules/Item.php
+++ b/app/Http/Controllers/Modules/Item.php
@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Modules;
use App\Abstracts\Http\Controller;
use App\Models\Module\Module;
-use App\Models\Module\ModuleHistory;
use App\Traits\Modules;
use Illuminate\Http\Request;
diff --git a/app/Listeners/Update/CreateModuleUpdatedHistory.php b/app/Listeners/Update/CreateModuleUpdatedHistory.php
index 1059630ad..5f28ee7b4 100644
--- a/app/Listeners/Update/CreateModuleUpdatedHistory.php
+++ b/app/Listeners/Update/CreateModuleUpdatedHistory.php
@@ -33,7 +33,6 @@ class CreateModuleUpdatedHistory
ModuleHistory::create([
'company_id' => $model->company_id,
'module_id' => $model->id,
- 'category' => $module->get('category', 'payment-method'),
'version' => $event->new,
'description' => trans('modules.history.updated', ['module' => $module->getAlias()]),
]);
diff --git a/app/Listeners/Update/V20/Version2017.php b/app/Listeners/Update/V20/Version2017.php
new file mode 100644
index 000000000..b5b9dcf76
--- /dev/null
+++ b/app/Listeners/Update/V20/Version2017.php
@@ -0,0 +1,29 @@
+skipThisUpdate($event)) {
+ return;
+ }
+
+ Artisan::call('migrate', ['--force' => true]);
+ }
+}
diff --git a/app/Models/Module/ModuleHistory.php b/app/Models/Module/ModuleHistory.php
index c3a61ba76..dbd3376dd 100644
--- a/app/Models/Module/ModuleHistory.php
+++ b/app/Models/Module/ModuleHistory.php
@@ -6,7 +6,6 @@ use App\Abstracts\Model;
class ModuleHistory extends Model
{
-
protected $table = 'module_histories';
/**
@@ -14,5 +13,5 @@ class ModuleHistory extends Model
*
* @var array
*/
- protected $fillable = ['company_id', 'module_id', 'category', 'version', 'description'];
+ protected $fillable = ['company_id', 'module_id', 'version', 'description'];
}
diff --git a/app/Providers/Event.php b/app/Providers/Event.php
index 3051a8b4f..52175a0bb 100644
--- a/app/Providers/Event.php
+++ b/app/Providers/Event.php
@@ -21,6 +21,7 @@ class Event extends Provider
'App\Listeners\Update\V20\Version208',
'App\Listeners\Update\V20\Version209',
'App\Listeners\Update\V20\Version2014',
+ 'App\Listeners\Update\V20\Version2017',
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\Auth\Login',
diff --git a/app/Traits/Modules.php b/app/Traits/Modules.php
index 1efbd8069..98e0d8529 100644
--- a/app/Traits/Modules.php
+++ b/app/Traits/Modules.php
@@ -460,7 +460,6 @@ trait Modules
{
$module = module($alias);
$name = $module->getName();
- $category = $module->get('category');
$version = $module->get('version');
$company_id = session('company_id');
@@ -483,7 +482,6 @@ trait Modules
'message' => null,
'data' => [
'name' => $name,
- 'category' => $category,
'version' => $version,
],
];
@@ -513,7 +511,6 @@ trait Modules
'message' => null,
'data' => [
'name' => $module->getName(),
- 'category' => $module->get('category'),
'version' => $module->get('version'),
],
];
@@ -543,7 +540,6 @@ trait Modules
'message' => null,
'data' => [
'name' => $module->getName(),
- 'category' => $module->get('category'),
'version' => $module->get('version'),
],
];
diff --git a/database/migrations/2020_07_20_000000_core_v2017.php b/database/migrations/2020_07_20_000000_core_v2017.php
new file mode 100644
index 000000000..48d82fc4c
--- /dev/null
+++ b/database/migrations/2020_07_20_000000_core_v2017.php
@@ -0,0 +1,30 @@
+dropColumn('category');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}
diff --git a/resources/views/install/updates/index.blade.php b/resources/views/install/updates/index.blade.php
index 1c08c7872..d43c5c603 100644
--- a/resources/views/install/updates/index.blade.php
+++ b/resources/views/install/updates/index.blade.php
@@ -46,9 +46,8 @@
@@ -57,9 +56,8 @@
@foreach($modules as $module)
{{ trans('general.name') }}
- {{ trans_choice('general.categories', 1) }}
- {{ trans('updates.installed_version') }}
- {{ trans('updates.latest_version') }}
+ {{ trans('updates.installed_version') }}
+ {{ trans('updates.latest_version') }}
{{ trans('general.actions') }}