cagartner/module-generatemigration

为您的CMS页面/块、配置、电子邮件模板生成迁移

安装: 4

依赖: 0

建议: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 0

类型:magento2-module

dev-master 2019-01-21 18:08 UTC

This package is auto-updated.

Last update: 2024-09-22 06:58:59 UTC


README

安装

composer require cagartner/module-generatemigration

使用

在您的控制台执行以下命令,生成的类文件将位于/var/migration

复制您生成的类并将其放入您的迁移模块中。

设置迁移

在创建任何迁移之前,您需要设置迁移模块,为此运行

bin/magento make:migration:init <Vendor> <NameofModule>
# Example
bin/magento make:migration:init Cagartner Migration

此命令将在magento结构中app/code文件夹中创建一个新模块。

app
|-- code
    |-- Cagartner
        |-- Migration
            |-- etc
                -- module.xml
            |-- Setup
                |-- migrations
                |-- InstallData.php
                |-- UpgradeData.php
            |-- composer.json
            |-- registration.php

您创建的每个迁移都将生成到该模块中的migrations文件夹

bin/magento make:migration:block {indentifier} {nameOfMigration}
# Example
bin/magento make:migration:block contact-us-info updateBlockInfo

页面

bin/magento make:migration:page {indentifier} {nameOfMigration}
# Example
bin/magento make:migration:page home updateHomePage

电子邮件模板

@todo

配置

@todo