News Feed
Sections




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

SitePoint PHP Blog:
Database Versioning with Ladder Migrations
April 22, 2014 @ 10:48:41

The SitePoint PHP blog has posted another tutorial looking at database versioning (see this postfocusing on Ladder migrations. Ladder is a simple PHP-based way to write migrations with rollbacks in a clear, easy to read format.

Version control systems are invaluable for tracking changes in your code, particularly when you're working in a team. However, most applications don't consist solely of application code. Managing changes to the database has always been a little more challenging, particularly when you're adding new features which require changes to the schema. [...] One solution is to move responsibility for creating and modifying the database schema into code, using migrations. That way, changes can be managed along with the rest of your application, and features we take for granted in version control - such as being able to compare versions and keep an audit trail - can be used for database changes.

He introduces the Ladder tool briefly, shows how to get it installed/configured and gets into writing a first simple migration. It creates a "users" table with two columns and comes with both "up" and "down" methods to make rollbacks easier. Ladder also provides functionality for database seeding, pre-populating the database tables with sample data either from hard-coded values or from a CVS file.

0 comments voice your opinion now!
database migration ladder versioning tutorial project

Link: http://www.sitepoint.com/database-versioning-ladder-migrations

blog comments powered by Disqus

Similar Posts

Vid Luther's Blog: Building PHP 5.3 packages on Ubuntu 9.04 (Jaunty) for Apache 2

NETTUTS.com: Create a Photo Admin Site Using PHP and jQuery

Dagfinn Reiersol's Blog: Real programming with PHP 5.3 (part 4): A more realistic example

DevShed: Introduction to the CodeIgniter PHP Framework

PHPBuilder.com: Dynamic XML with PHP


Community Events





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


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

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