visol / migrations
启用由 Doctrine 驱动的 SQL 迁移
4.1.0
2022-11-07 20:01 UTC
Requires
- php: ~7.4.0 || ~8.0.0 || ~8.1.0
- doctrine/migrations: ^3.0
- typo3/cms-core: ^10.4 || ^11
README
这是一个 TYPO3 扩展,它集成了doctrine 迁移工具。
安装
使用 composer 安装扩展。目前需要手动声明 git 仓库。
"repositories": [ { "type": "git", "url": "https://github.com/visol/ext-migrations.git" } ],
composer require visol/migrations
安装扩展后,您可能需要在 TYPO3 扩展管理器中覆盖配置文件的路径。
默认配置文件位于 EXT:migrations/Configuration/migrations.php
使用方法
migrations migrations:dump Dump the schema for your database to a migration. migrations:generate Generate a blank migration class. migrations:latest Outputs the latest version migrations:list Display a list of all available migrations and their status. migrations:migrate Execute one or more migration versions up or down manually. migrations:rollup Rollup migrations by deleting all tracked versions and insert the one version that exists. migrations:status View the status of a set of migrations. migrations:version Manually add and delete migration versions from the version table.
要开始,我们推荐执行 migrations:generate
命令。它将生成默认的迁移骨架文件。
致谢
灵感来源和首次实现来自 Kai Strobach https://git.kay-strobach.de/typo3/migrations