#152 updates.xml, and schema versioning

Slash 2.3/2.4
open
nobody
MySQL (16)
4
2004-04-11
2002-05-27
No

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.');

Discussion

  • Rob Malda
    Rob Malda
    2002-06-03

    • assigned_to: nobody --> pudge
     
  • Chris Nandor
    Chris Nandor
    2002-08-06

    • priority: 5 --> 4
     
  • Chris Nandor
    Chris Nandor
    2002-11-19

    • assigned_to: pudge --> nobody
    • labels: 102827 -->
    • priority: 4 --> 1
     
  • Chris Nandor
    Chris Nandor
    2002-11-19

    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.

     
  • Clifton Wood
    Clifton Wood
    2003-07-23

    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

     
  • Jamie McCarthy
    Jamie McCarthy
    2004-04-11

    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.

     
  • Jamie McCarthy
    Jamie McCarthy
    2004-04-11

    • priority: 1 --> 4
    • labels: --> MySQL
    • milestone: --> Slash 2.3/2.4
    • summary: add schemaVersion to vars --> updates.xml, and schema versioning