To further explain how this could work:
1. Check for a table called freevo_core or something, which has a few basic things, including a version number. 2. If no table exists, then use a 'create_tables()' function 3. If table DOES exist, check the version and use ALTER TABLE commands to update it, and then update the version. I guess for the ALTER to work, you'd need to keep the revisions in kind of a cascaded list, i.e. ver = get_ver_from_table() if ver < X1: command() if ver < X2: command() if ver < X3: command() and X1 < X2 < X3 so it would call start at one and call the functions beneath it so instead of keeping a bunch of upgrade queries, you just run the alters for each version. You probably thought of this, but here it is ;) On Mon, Oct 18, 2004 at 04:43:57PM -0400, Aubin Paul wrote: > On Mon, Oct 18, 2004 at 09:18:03PM +0200, Dirk Meyer wrote: > > > -You must load the schema into the database before using it, sqlite > > > /path/to/freevo/cache/epgdb < lib/pyepg/epg_schema.sql. I would like > > > to have this automaticly done, and also a way to auto upgrade the > > > schema between revisiions. > > > > IIRC Aubins metadata db doesn't need this. Maybe you can look there. > > Creating tables is just another query, so the same way you can embed a > SELECT, UPDATE, etc. in the code, you can do the same with the CREATE > directive. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Freevo-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/freevo-devel ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel