Hi all,
I did a commit to put the provider online. It's now at my Google code 
repository: 
http://code.google.com/p/sozfo/source/browse/trunk/library/Sozfo/Tool/Doctrine/Provider.
 
Still pre-pre-pre-alpha ;)

Please note it's at the very beginning and meant to provide very basic 
functionality:
 * create db based on doctrine connections
 * drop db based on doctrine connections
 * migrate db
 * generate (php) models (from yaml or db)
 * generate (db) tables (from php models or yaml)
 * generate (yaml) schema files (from php models or db)
 * load data (fixtures)
 * dump data (fixtures)

All on a modular base. A part of the config looks like this:
paths.modules.schema  = "configs/schema"
paths.modules.sql = "configs/data/sql"
paths.modules.fixtures = "configs/data/fixtures"
paths.modules.migrations = "configs/migrations"
paths.modules.models = "models"

This means "zf generate doctrine.models --module=blog --from=yaml" loads 
application/modules/blog/configs/schema/ and put the models in 
application/modules/blog/models/ 

I'm now thinking of two issues:
* what if you don't provide the module parameter? You could use the global 
application models (use application/ instead of application/module/$module as 
prefix). An option is to point to the default module, or loop all modules and 
execute the code for each module individually.
* I'd like to migrate my db on a modular base. Each module should be have it's 
own version number. I'm not sure how to cover this in Doctrine.

Regards, Jurian
-- 
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com

On Wednesday 23 Dec 2009 14:01:03 Jurian Sluiman wrote:
> I'll have a look if Ralph is on IRC tonight. The "problem" is the
> application.ini where a lot of Doctrine config is located. Connections,
> Doctrine_Manager attributes and path settings (for modular support). All
> these things are already supported by the My_Application_Resource_Doctrine
> (a customized version from the proposal at the wiki).
> 
> I think I'll finish some bits in the upcoming week. It's quite specific for
> my own configuration, but I'll post some info when I've dealt with this
> issue :) One note: I'm only using existing resources like the
> applicationConfigFile and moduleDirectory. My component won't provide
> contexts to make Zend_Tool models aware (because I don't need it).
> 
> Regards, Jurian
> 
> 2009/12/23 keith Pope <mute.p...@googlemail.com>
> 
> > Funny, I was going to start looking at the DC2 integration over
> > christmas, how far along are you with the DC1 stuff?
> >
> > You should be able to use the app resource from within ZT however not
> > sure if this would be acceptable, might want to ask Ralph about the
> > implications :) Does it really duplicate that much code?
> >
> > Not sure why an autoloader would not be used, I suppose it could be a
> > legacy thing.
> >
> > ------------
> > http://www.thepopeisdead.com
> 

Reply via email to