1

Is it possible to add behaviors (eg. actAs Timestampable) in a doctrine migration to avoid defining the created_at and updated_at columns ?

Thank's in advance !

1

2 Answers 2

2

I think there is no way to add behaviors in the migration code.

BUT! if you are using doctrine 1.1 (it's easy to migrate from 1.0) you can instead modify your schema, add the behavior, and let doctrine generate the migration code as explained here:

http://www.doctrine-project.org/blog/new-to-migrations-in-1-1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.