Hi Fellow Bakers

I thought that I should share a recent experience with you.  After my 
little disaster during the week with models in appController and a 
missing database table, I thought I should look into automating the 
synchronisations of database structures and data again.

I looked for a solution to this in the past when I set up my current 
system for automating builds using Eclipse and Ant, but had no luck.

This time I have found the solution.  It is called DdlUtils and is an 
Apache project.  It can be found here:

http://db.apache.org/ddlutils/index.html

 From their home page:

"DdlUtils is a small, easy-to-use component for working with Database 
Definition (DDL) files. These are XML files that contain the definition 
of a database schema, e.g. tables and columns. These files can be fed 
into DdlUtils via its Ant task or programmatically in order to create 
the corresponding database or alter it so that it corresponds to the 
DDL. Likewise, DdlUtils can generate a DDL file for an existing database."


It took me about 6 hours to compile, installed into Eclipse and Ant, and 
then to puzzle out how to get it working, but the results so far look good.

I can add tasks to my Ant build processe in my php projects that will:

- Dump a database schema to XML - allowing me to store the structure and 
data in my Perforce repository for safe keeping

- Effortlessly duplicate a development database schema to a staging 
version for testing, or from staging to production

- Synchronise schema changes between development, staging, and 
production databases


Currently there is a problem with export of data from the host database 
and I am talking to people on DdlUtils mailing list about it.  I expect 
that I should be able to resolve this soon, and be able to add data 
transfer and synchronisation to all of the above tasks.


Bottom line: I like DdlUtils a lot, and it will save me time and trouble 
in the future I am sure.

If you use Ant, or are considering using it for automating builds, then 
I would strongly recommend taking a look at DdlUtils.

Hope this info may be of use to some members on the list.

Regards,
Langdon

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to