Adding this to defaults.sql, and bumping the version
number on every release would make it a lot easier in
future to update the schema.
INSERT INTO vars (name, value, description) VALUES
('schema_version','2.2.6','Version number for this
release of the discussion software - used internally
when updating slashcode.');
Logged In: YES
user_id=3660
If someone can find a way to automatically update such a
thing in the updates file, it might be nice. Until then, we
don't even have a release planned, so I don't see a need to
spend time on thinking about this.
Logged In: YES
user_id=24938
Nigel,
This is something that I'd like to see added to Slash. If you would be
interested in working on something like this for Slash, then email me. You
can use my SourceForge address or pop by http://slashdot.org/~cliff
Logged In: YES
user_id=3889
We will eventually have an sql/mysql/updates.xml file where we track all
the changes that need to happen to the DB between versions. Each
version should be marked with a unix timestamp, and with some kind of
string that indicates the name of the version, e.g. (in order of
development) 2_3_0_123, 2_3_0, 2_3_1_1. The script that parses the
XML file to decide what changes need to be applied to your database will
read what version your site is at, then find all versions between that and
the target version you're moving to (where "between" can be ordered by
the timestamp), and then apply all necessary changes and update the
record of your site's version.
And when we do get around to doing this, that version string should be
stored in the site_info table, not in a var.