Doctrine2 迁移命名
Doctrine2 migrations naming
我对 doctrine2 迁移命名有疑问。
当我从命令行使用 doctrine:migrations:diff
时,我得到 php-迁移脚本,其名称类似于 VersionYYYYMMDDHHMMSS (Version20160111202114).但我希望能够自行决定调用脚本,例如 Table_AddColumn 之类的东西。
我该怎么做?
提前感谢您的回复。
我认为这是不可能的,因为名称的时间戳用于执行迁移。
Since versions are ordered, doctrine generates version numbers with a
date time like Version20150505120000.php. This ensures that the
migrations are executed in the correct order.
While you can use custom filenames, it’s probably a good idea to the
Doctrine generate migration files for you.
我对 doctrine2 迁移命名有疑问。
当我从命令行使用 doctrine:migrations:diff
时,我得到 php-迁移脚本,其名称类似于 VersionYYYYMMDDHHMMSS (Version20160111202114).但我希望能够自行决定调用脚本,例如 Table_AddColumn 之类的东西。
我该怎么做?
提前感谢您的回复。
我认为这是不可能的,因为名称的时间戳用于执行迁移。
Since versions are ordered, doctrine generates version numbers with a date time like Version20150505120000.php. This ensures that the migrations are executed in the correct order.
While you can use custom filenames, it’s probably a good idea to the Doctrine generate migration files for you.