migration rollback at path, additional info routs
This commit is contained in:
@ -30,8 +30,7 @@ class TagModule extends Module
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->migrationService->runAtPath("{KERNEL_APP_MODULES}/tag/migrations/tag");
|
||||
$this->migrationService->runAtPath("{KERNEL_APP_MODULES}/tag/migrations/tag_entity");
|
||||
$this->migrationService->runAtPath("{KERNEL_APP_MODULES}/tag/migrations");
|
||||
|
||||
$this->menuService->createItem([
|
||||
"label" => "Тэги",
|
||||
@ -49,11 +48,17 @@ class TagModule extends Module
|
||||
OptionService::createFromParams("entity_tag_list", "{}", "Список тегов");
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function deactivate(): void
|
||||
{
|
||||
$this->menuService->removeItemBySlug("tag");
|
||||
$this->menuService->removeItemBySlug("tag_settings");
|
||||
|
||||
OptionService::removeOptionByKey("entity_tag_list");
|
||||
|
||||
$this->migrationService->rollbackAtPath("{KERNEL_APP_MODULES}/tag/migrations");
|
||||
}
|
||||
|
||||
public function formInputs(string $entity, Model $model = null): void
|
||||
|
@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public string $migration;
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
@ -28,4 +29,5 @@ return new class extends Migration
|
||||
{
|
||||
\kernel\App::$db->schema->dropIfExists('tag');
|
||||
}
|
||||
|
||||
};
|
@ -6,6 +6,8 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public string $migration;
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
Reference in New Issue
Block a user