News Feed
Sections




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

Gonzalo Ayuso's Blog:
Keep our PostgreSQL databases synchronized with PHP. Database version control
December 13, 2010 @ 09:26:49

In this new post to his blog today Gonzalo Ayuso looks at how he's set up a system that uses PHP to synchronize their PostgreSQL databases' schemas when things changed.

We create source code at development server and push the changes to production. It's really easy to keep synchronized all our code. But with databases it's different. [...] It's a recurrent problem working with databases. We create database objects (tables, views, ..) in the development server and when our application is ready to go live we push the changes to production server. If we are smart developers we save all database scripts in a file and when we deploy them to production we execute the script.

He mentions tools like dbdeploy and phing to help make these migrations a bit more automatic. He needed something a little different though - a command-line script that would, based on an ini file, sync two or more databases. He's created the basic script that includes the actions to show the differences between the databases, a summary of the differences and an execution method to bring them into sync. He gives a basic example of how it would handle the sync between his example production and development databases.

0 comments voice your opinion now!
synchronize database schema version control


blog comments powered by Disqus

Similar Posts

Edin Kadribasic's Blog: PHP 4.4.4-win32 with MySQL 5.0.22

Juozas Kaziukenas' Blog: ACL made easy. Part 1

Lukas Smith\'s Blog: My take on the PHP6 meeting results

PHPMaster.com: Database Interaction Made Easy with NotORM

Gonzalo Ayuso's Blog: Keep our PostgreSQL databases synchronized with PHP. Database version control


Community Events





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


bugfix community opinion api list symfony install voicesoftheelephpant library language interview introduction framework laravel deployment podcast release series tips package

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