Jorge Vargas schrieb:
> On Wed, Feb 25, 2009 at 2:45 PM, Christoph Zwerschke <[email protected]> wrote:
>> In TG1, "tg-admin sql update" was very handy for adding columns to your
>> database. Is there something similar in TG2? There is "paster migrate",
>> but this is more complicated and requires me to write my upgrade script
>> manually, while tg-admin sql update did everything automatically.
> 
> In TG1 this was done delegating to SO's cli. And it was terribly
> broken for complex moves (ie adding more than just a flew things or
> moving or deleting) SA's migrate even though more complex is a real
> tool for keeping your model in sync with the db. That said I do think
> migrate is a little too verbose for the common cases maybe it should
> grow a "common migrations" strategy. Perhaps is something TG can
> contribute back.

Yes, for SO TG1 delegated to sqlobject-admin, but for SA TG1 used its 
own module (sacommand). It was indeed very primitive, but it worked very 
well for me while developing prototypes. Later, when the app is in 
production, it makes sense to write migration scripts.

> PS: I think we should start moving the TG2 support questions to the
> main list and keep tg2 for development stuff.

Ok. But you can also understand this as a development question: Do we 
want to port "tg-admin sql update" or something equivalent to TG2?

Another technique I'm sometimes using (with postgres, not sure how well 
this works with other dbs) is dumping the database, dropping it, then 
recreating the database and re-importing only the data into the newly 
created table. There could be a command for this similar to setup-app.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to