Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在学说迁移中添加行为(例如 actAs Timestampable)以避免定义 created_at 和 updated_at 列?
提前致谢 !
我认为没有办法在迁移代码中添加行为。
但!如果您使用的是教义 1.1(很容易从 1.0 迁移),您可以改为修改架构,添加行为,并让教义生成迁移代码,如下所述:
http://www.doctrine-project.org/blog/new-to-migrations-in-1-1
供参考
http://groups.google.com/group/doctrine-user/browse_thread/thread/5957eb2ad2dcb407#