您可以使用 Doctrine 从现有表生成迁移吗?
是否可以从 Doctrine 中的表模式自动生成迁移脚本?
例如,在新功能的大量开发过程中,我通常会在编写初始代码时首先构建我的表。 我通常不会创建迁移来开始,因为表的定义可能会发生变化,因为该功能仍处于婴儿阶段。 一旦该功能准备好提交,我将编写一个迁移来生成新功能的表结构。 通常,会有几张新桌子。
你可以说我很懒,但如果能够自动构建这些迁移那就太棒了。
例如:
学说 build-migration table_name
是否存在可以完成这样的事情?
Is it possible have a migration script automatically generate from a table schema in Doctrine?
For example, during heavy development of new features, I will oftern build out my tables first while writing the initial code. I usually don't create a migration to start because the definition of the table may change as the feature is still in its infant stages. Once the feature is ready to commit I will write a migration to generate the table structure for the new feature. Often, there will be several new tables.
Call me lazy but it would be awesome if could have those migrations built automagically.
For example:
doctrine build-migration table_name
Does something exist to accomplish something like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个(或类似的东西)存在于 Doctrine 1.1 中,您可以从 Doctrine 站点获取预览版本。
看:
http://www.doctrine-project.org/博客/new-to-migrations-in-1-1
This (or something like it) is present in Doctrine 1.1, you can get a preview version from the doctrine site.
See:
http://www.doctrine-project.org/blog/new-to-migrations-in-1-1