o3-shop/shop-doctrine-migration-wrapper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

o3-shop/shop-doctrine-migration-wrapper

Composer 安装命令:

composer require o3-shop/shop-doctrine-migration-wrapper

包简介

O3-Shop database migrations using doctrine

README 文档

README

https://travis-ci.org/o3-shop/o3-shop-doctrine-migration-wrapper.svg?branch=master

Document: https://docs.o3-shop.com/developer/en/6.2/development/modules_components_themes/module/database_migration/index.html

Branch Compatibility

  • master branch is compatible with O3-Shop compilation master
  • b-6.4.x branch is compatible with O3-Shop compilation 6.4.x
  • b-6.3.x branch is compatible with O3-Shop compilation 6.3.x
  • b-3.x branch is compatible with O3-Shop compilation 6.2.x
  • b-1.x branch is compatible with O3-Shop compilations before 6.2.x

Description

O3-Shop uses database migrations for:

  • eShop editions migration
  • Project specific migrations
  • Modules migrations

At the moment O3-Shop uses "Doctrine 2 Migrations" and it's integrated via O3-Shop migration components.

Doctrine Migrations runs migrations with a single configuration. But there was a need to run migration for one or all the projects and modules (CE, PR and a specific module). For this reason Doctrine Migration Wrapper was created.

Running migrations - CLI

Script to run migrations is installed within composer bin directory. It accepts two parameters:

  • Doctrine Command
  • Suite Type (CE, PR or a specific module_id)
vendor/bin/oe-eshop-db_migrate <Doctrine_Command> <Suite_Type>

To get comprehensive information about Doctrine 2 Migrations and available commands as well, please see official documentation.

Example:

vendor/bin/oe-eshop-db_migrate migrations:migrate

This command will run all the migrations which are in O3-Shop specific directories. For example if you have migration tool will run migrations in this order:

  • Community Edition migrations (executed always)
  • Project specific migrations (executed always)
  • Module migrations (executed when eShop has at least one module with migration)

Suite Types (Generate migration for a single suite)

It is also possible to run migrations for specific suite by defining <Suite_Type> parameter in the command. This variable defines what type of migration it is. There are 5 suite types:

  • PR - For project specific migrations. It should be always used for project development.
  • CE - Generates migration file for O3-Shop Community Edition. It's used for product development only.
  • <module_id> - Generates migration file for O3-Shop specific module. It’s used for module development only.

Example 1:

vendor/bin/oe-eshop-db_migrate migrations:generate

This command generates migration versions for all the suite types.

Example 2:

vendor/bin/oe-eshop-db_migrate migrations:generate CE

In this case it will be generated only for Community Edition in vendor/o3-shop/shop_ce/migration directory.

Use Migrations Wrapper without CLI

Doctrine Migration Wrapper is written in PHP and also could be used without command line interface. To do so:

  • Create Migrations object with MigrationsBuilder->build()
  • Call execute method with needed parameters

Bugs and Issues

If you experience any bugs or issues, please report them in the section O3-Shop (all versions) of https://bugs.o3-shop.com.

o3-shop/shop-doctrine-migration-wrapper 适用场景与选型建议

o3-shop/shop-doctrine-migration-wrapper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.04k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 02 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 o3-shop/shop-doctrine-migration-wrapper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 o3-shop/shop-doctrine-migration-wrapper 我们能提供哪些服务?
定制开发 / 二次开发

基于 o3-shop/shop-doctrine-migration-wrapper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2023-02-28