danielmaier / attributemigration
基于CLI的Magento 2属性迁移
1.0.1
2018-03-11 19:24 UTC
Requires
- danielmaier/consoleutility: ^1
- magento/framework: *
- magento/module-catalog: *
- magento/module-eav: *
- magento/module-store: *
This package is auto-updated.
Last update: 2024-09-09 19:39:07 UTC
README
AttributeMigration
是一个开源的 Magento 2 包,用于将属性迁移到不同类型。
特性
- 将布尔值迁移到选择框
- 将文本迁移到选择框
更多迁移即将到来 - 也有计划通过检测源属性和目标属性类型来实现动态迁移。
安装
您可以通过 Composer 安全地安装此模块
composer require danielmaier/attributemigration
php bin/magento setup:upgrade
使用方法
您可以通过 CLI 执行每个迁移。您可以通过 Cronjobs 运行迁移并将属性代码作为参数传递,或者在交互模式下运行并忽略参数。迁移可以通过这两种方式调用
交互模式
php bin/magento attribute-migration:text-to-select
您将被要求输入旧属性代码作为源和新的属性代码作为目标。
自动模式
php bin/magento attribute-migration:text-to-select --old_attribute=<CODE> --new_attribute=<CODE>
当您不确定参数的名称时,您可以通过运行以下命令(对于每个 Magento 2 命令)来检查它们:
php bin/magento help attribute-migration:text-to-select
贡献
如果您想添加另一个功能或发现一个错误,欢迎所有人贡献。