On 20/07/07, Christopher Arndt <[EMAIL PROTECTED]> wrote: > > Rangi Sutton schrieb: > > To clarify; I have a project up and running, and now I'd like to add a > > new column to a table. I add it to the tables class definition in > > model.py, but how do I get the database to update subsequently?
> The way I handle is, that I create scripts that create and populate the > database with bootstrap data (using the SQLObject or SQLAlchemy API). > Then I can run these scripts each time I install the application > somewhere else. > > Because these scripts are kept in sync with the structure of the model, > I don't need to mess around with the database structure directly, since > the database can always be created from scratch when I make changes to > the model. Thanks all for your replies... Chris's suggestion above I adopted, for the reasons he gives. Only describing the model once in one place appeals to me, hand modifying the sql tables is just another thing for me to screw up. As someone very new to this it took some tinkering to figure out what to import from where to make myself a "populate_db.py" that I could simple source from the command line. Good learning process, but it would be nice if the wiki covered some of this ground... <hint> For anyone reading along that's in my position heres a sample from by file.. but of course I'm totally new to this so it'll be the blind leading the blind: http://paste.turbogears.org/paste/1523 Thanks all! Beers, r. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

