SQL schema version table to ease future database upgrades

This commit is contained in:
Christian Weiske 2011-05-04 08:02:33 +02:00
parent 69e58d8632
commit dda05f5cc7
4 changed files with 23 additions and 1 deletions

4
data/schema/6.sql Normal file
View File

@ -0,0 +1,4 @@
CREATE TABLE `sc_version` (
`schema_version` int(11) NOT NULL
) DEFAULT CHARSET=utf8;
INSERT INTO `sc_version` (`schema_version`) VALUES ('6');

View File

@ -182,4 +182,10 @@ CREATE TABLE `sc_votes` (
UNIQUE KEY `bid_2` (`bId`,`uId`), UNIQUE KEY `bid_2` (`bId`,`uId`),
KEY `bid` (`bId`), KEY `bid` (`bId`),
KEY `uid` (`uId`) KEY `uid` (`uId`)
) CHARACTER SET utf8 COLLATE utf8_general_ci ; ) CHARACTER SET utf8 COLLATE utf8_general_ci ;
CREATE TABLE `sc_version` (
`schema_version` int(11) NOT NULL
) DEFAULT CHARSET=utf8;
INSERT INTO `sc_version` (`schema_version`) VALUES ('6');

View File

@ -16,6 +16,7 @@ ChangeLog for SemantiScuttle
- Fix privacy issue when fetching tags of several users - Fix privacy issue when fetching tags of several users
- Only URLs with an allowed protocol may be added to the database - Only URLs with an allowed protocol may be added to the database
- Support HTTPS connections when $root is not configured - Support HTTPS connections when $root is not configured
- SQL schema version table to ease future database upgrades
0.97.2 - 2011-02-17 0.97.2 - 2011-02-17

View File

@ -2,6 +2,17 @@ Upgrading SemanticScuttle from a previous version
================================================= =================================================
From version 0.97 to 0.98
-------------------------
Database updates: Apply data/schema/6.sql or do the following:
CREATE TABLE `sc_version` (
`schema_version` int(11) NOT NULL
) DEFAULT CHARSET=utf8;
INSERT INTO `sc_version` (`schema_version`) VALUES ('6');
From version 0.96 to 0.97 From version 0.96 to 0.97
------------------------- -------------------------
No database changes necessary. No database changes necessary.