News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Hartjes' Blog:
Smarter DB Migrations using Zend Framework and Doctrine 1.2
January 20, 2011 @ 10:11:39

Chris Hartjes, after finally figuring out an issue with database migrations with Doctrine on a Zend Framework application, has posted about the process to his blog today. As he notes:

This posting is a lesson on the value of actually looking at the source code of a third-party library when you are trying to figure something out...

His problem wasn't with the features of Doctrine and how easy it made to automate things in his environments (continuous integration). His issue was that Doctrine wanted to run all of the migrations every time it was executed. Upon closer inspection, he found the key - a migration_version table in his database that held current migration information. He includes a simple Zend Framework-based script he's now using get the latest value from that table and execute only the migrations after that. The migrations are executed in order - he recommends using a timestamp or formatted date on the filename to set the order.

0 comments voice your opinion now!
zendframework migration doctrine tutorial version


blog comments powered by Disqus

Similar Posts

Fawad Hassan's Blog: Load More Using KnockoutJS, PHP/CodeIgniter (Part 1)

Alexy Kovyrin\'s Blog: Nginx With PHP As FastCGI Howto

Stuart Herbert's Blog: PHP Components: Shipping Web Pages With Your Components

Sameer Borate's Blog: Parallel cURL execution in PHP

Marcelo Gornstein's Blog: Writing PHP applications with Doctrine2 as ORM and Ding as DI container


Community Events

Don't see your event here?
Let us know!


laravel conference application extension community php7 symfony2 example framework release interview series api opinion introduction voicesoftheelephpant version performance library podcast

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework