Re: [Nemiver-list] Saving / restoring environment variables with a session
- From: "Jonathon Jongsma" <jonathon jongsma domain hid>
- To: "dodji Seketeli" <dodji domain hid>
- Cc: nemiver-list domain hid
- Subject: Re: [Nemiver-list] Saving / restoring environment variables with a session
- Date: Mon, 25 Sep 2006 10:36:19 -0500
On 9/25/06, dodji Seketeli <dodji domain hid> wrote:
On 9/25/06, Jonathon Jongsma <jonathon jongsma domain hid> wrote:
> I thought I'd send this out as a patch instead of committing it right
> away because it involves a change to the database, and I wanted to
> make sure it looked ok to you before making you update or delete your
> old session database. All it does is create a new table called
> env_variables that stores the name/value pairs for environment
> variables associated with a session ID. These are saved on exit and
> loaded when a session is loaded.
>
> OK to commit?
Sure ! The patch looks good to me.
OK, I've committed it now. You'll need to either delete your session
database and re-create it or manually add the new table the next time
you update from svn.
> Also, would it be a good idea to make a little database
> upgrade script for cases like this in the future?
Yup, we will definitely need that. I think it would be something that
would drop the "old" tables and create the "new" ones. There should be
a drop-tables.sql script, just like we have a create-table.sql script
today. Initializing the DB would then mean running the the
drop-tables.sql script (ignoring the potential errors) and running the
create-tables.sql script.
At this point that might be OK since it's at such an early stage of
development, but at some point we'd probably want to simply add the
new table to the DB instead of dropping the whole db, so that the user
doesn't lose their data on an upgrade. I just noticed that there's a
schemainfo table that we could use to determine determine how to
upgrade the database? Maybe I should have changed that value from 1.0
to something else?
--
jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]