team23/module-cleanup-eav

提供 CLI 任务以清理实体-属性-值表

安装: 290

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:magento2-module

1.2.1 2024-09-16 13:30 UTC

This package is auto-updated.

Last update: 2024-09-16 13:31:24 UTC


README

《Team23_CleanupEav》模块使您能够维护和清理您的 eav 数据库。

安装

通过 composer 进行安装

composer require team23/module-cleanup-eav

现在使用 bin/magento setup:upgrade 注册该模块。

配置

一些核心路径被排除在数据库清理之外。您可以在 di.xml 文件中添加更多其他模块的路径。

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Team23\CleanupEav\Model\Config">
        <arguments>
            <argument name="excludedPaths" xsi:type="array">
                <item name="amasty_first" xsi:type="string">amasty_base/system_value/first_module_run</item>
                <item name="amasty_last" xsi:type="string">amasty_base/system_value/last_update</item>
                <item name="amasty_remove" xsi:type="string">amasty_base/system_value/remove_date</item>
            </argument>
        </arguments>
    </type>
</config>

可扩展性

扩展开发者可以与《Team23_CleanupEav》模块交互。有关 Magento 扩展机制的更多信息,请参阅Magento 插件

Magento 依赖注入机制允许您覆盖《Team23_CleanupEav》模块的功能。

CLI 命令

  • eav:cleanup:media 比较产品图片的数据库和磁盘空间,并清理两者。
  • eav:cleanup:config-path 删除核心配置表的数据库中的孤立路径。
  • eav:cleanup:config-scope 比较路径的全局和范围数据,如果相同则删除范围条目。