Chris Tankersley

· PHP Jack of All Trades ·


For part of the work for Manuscript I created a nice installer package that helps the user automatically create a database and INI files. One of the challenges that almost any project faces is how to maintain upgrades through the future since it is not terribly nice to ask users to install from scratch each time.

For that, as well as my other projects, I've come up with Tws_SchemaManager. This allows for PHP-based database manipulation for installation as well as upgrades through some basic PHP classes. These can be called from within CLI scripts or from web apps to help facilitate the DB upgrades in a contained manner.

Right now it only works for Zend Framework and is pretty much dependent upon it, or at last the Zend_Db_Adapter portion of the framework. It also only support SQLite as of right now, with Microsoft SQLServer 2008 and MySQL to be added within the next few days. Full usage instructions can be found here.

Look Before You Leap

I didn't realize until after I had done most of the work that Rob Allen also has a Schema Manager. Rob is a great programmer so it was nice to see some of my ideas in his manager as well.

One difference between the two is that Tws_SchemaManager is meant to support multiple database backends through the multiple handlers, where I don't see a way to do that in Rob's (if I'm wrong, awesome, because Rob's code is a bit more thorough in some places that mine!).


Categories: PHP, Programming, TWS Software

Tags: Coding, Manuscript, PHP