diff options
author | Mark Pemberton <mpemberton5@gmail.com> | 2011-05-14 23:08:46 -0400 |
---|---|---|
committer | Mark Pemberton <mpemberton5@gmail.com> | 2011-05-14 23:08:46 -0400 |
commit | 16791766dee4f9c03700b7c817063071e4d0ed33 (patch) | |
tree | 0040112a76dd9239be3b2c4b63343e023813b903 | |
parent | 6ed90e647a0a513def828ec66f17df2b724c518e (diff) | |
download | semanticscuttle-16791766dee4f9c03700b7c817063071e4d0ed33.tar.gz semanticscuttle-16791766dee4f9c03700b7c817063071e4d0ed33.tar.bz2 |
Fixed SQL structure for PrivateKey
-rw-r--r-- | data/schema/6.sql | 2 | ||||
-rw-r--r-- | data/tables.sql | 8 | ||||
-rw-r--r-- | doc/UPGRADE.txt | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/data/schema/6.sql b/data/schema/6.sql index e4acd53..cf9dd37 100644 --- a/data/schema/6.sql +++ b/data/schema/6.sql @@ -15,5 +15,5 @@ CREATE TABLE `sc_users_sslclientcerts` ( ) CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL; -CREATE INDEX `privateKey` ON `sc_users` (`privateKey`); +CREATE UNIQUE INDEX `privateKey` ON `sc_users` (`privateKey`); diff --git a/data/tables.sql b/data/tables.sql index dd4e924..68d5ba9 100644 --- a/data/tables.sql +++ b/data/tables.sql @@ -72,7 +72,9 @@ CREATE TABLE `sc_users` ( `email` varchar(50) NOT NULL default '', `homepage` varchar(255) default NULL, `uContent` text, - PRIMARY KEY (`uId`) + `privateKey` varchar(33) default NULL, + PRIMARY KEY (`uId`), + UNIQUE KEY `privateKey` (`privateKey`) ) CHARACTER SET utf8 COLLATE utf8_general_ci ; -- -------------------------------------------------------- @@ -84,9 +86,7 @@ CREATE TABLE `sc_users_sslclientcerts` ( `sslClientIssuerDn` VARCHAR( 1024 ) NOT NULL , `sslName` VARCHAR( 64 ) NOT NULL , `sslEmail` VARCHAR( 64 ) NOT NULL , - `privateKey` varchar(33) default NULL, - PRIMARY KEY ( `id` ) , - UNIQUE KEY `privateKey` (`privateKey`) + PRIMARY KEY ( `id` ) ) CHARACTER SET utf8 COLLATE utf8_general_ci; -- diff --git a/doc/UPGRADE.txt b/doc/UPGRADE.txt index fe8624a..53ccbf4 100644 --- a/doc/UPGRADE.txt +++ b/doc/UPGRADE.txt @@ -13,7 +13,7 @@ Database updates: Apply data/schema/6.sql or do the following: INSERT INTO `sc_version` (`schema_version`) VALUES ('6'); ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL; - CREATE INDEX `privateKey` ON `sc_users` (`privateKey`); + CREATE UNIQUE INDEX `privateKey` ON `sc_users` (`privateKey`); From version 0.96 to 0.97 |