On Wed, Feb 25, 2009 at 5:32 PM, Christoph Zwerschke <[email protected]> wrote:
>
> 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.
>

correct what I don't want is people to think "sacommand" is the "real
thing" as migrations is the way to go. 'sa command' as you well put it
is just some sort of quick hack for dev environments.

under those conditions I do think we could reintegrate this +1, can we
make a ticket?

>> 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.
>

I have a rather screwed up way of doing this but so far it has worked for dev.
1- rm the sqlite file
2- run setup-app
3- keep all the "test data" inside websetup.py

I know it isn't scalable but again it's a quick hack

> -- 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