D-Rock
D-Rock

Reputation: 2676

Can you generate a migration from an existing table with Doctrine?

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?

Upvotes: 1

Views: 2396

Answers (1)

Ciaran McNulty
Ciaran McNulty

Reputation: 18848

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

Upvotes: 2

Related Questions