Thanks all for the ideas. I will try generating a new Identity-based project and paste in the new classes; that certainly makes the most sense.
phpMyAdmin makes dumping out your data pretty easy; I do that in conjunction with some Bash scripts. For what it's worth, Rails has some nice DB migration stuff that would be *great* to see in TG in some form in the future. :) iain duncan wrote: > On Thu, 2007-11-01 at 12:20 +0000, Ben Sizer wrote: > > [EMAIL PROTECTED] wrote: > > > > > Hi all, > > > > > > Is there an easy way to add Identity to an existing TG project? I've > > > written a LOT of code and am hoping to avoid starting a new project and > > > manually updating the model, copying over my code, etc. Thanks in > > > advance! > > > > It seems to me, from previous replies to myself in supposedly simpler > > situations, that even trivial alterations to your schema involve > > "manually updating the model". Perhaps you can simplify this by > > creating an empty new project with Identity enabled, and running a diff > > on the relevant model.py and SQL schemas, to see what needs changing. > > >From my experience, this is only a problem if you are making changes to > an object/table that *already* exists. Brand new tables should not be a > problem. If you find yourself doing this frequently, it might be handy > to use a bash script in the following manner: > > - bash script uses sql client to back up and drop tables > - use tg-admin sql to create new sql file > - bash script edits new sql file to keep only the diff or make some > changes > - bash script runs new sql file on the db > > There is a bunch more overhead involved, but it makes it a lot easier to > keep back ups of tables in question in case you already have real data. > With mysql at least you can also add to the above dumping sql data with > long form queries ( ie, each column is explictly named in an insert ) so > it's easy to plonk it all back in if all you've done is add or change a > row or two. > > Iain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en -~----------~----~----~----~------~----~------~--~---

