aboutsummaryrefslogtreecommitdiffstats
path: root/database.sql
diff options
context:
space:
mode:
authorAlexander Kampmann <programmer@nurfuerspam.de>2012-04-05 13:27:09 +0200
committerAlexander Kampmann <programmer@nurfuerspam.de>2012-04-05 13:27:09 +0200
commitcbf4544887c7f496f2b2312727fe7bcb64a6d6c8 (patch)
tree6b327da2db68c6be38d917ee7e869e7546fa096d /database.sql
parent9ba5fff865ed1d17c86982a5cf939f8e3e45da05 (diff)
downloadvolse-hubzilla-cbf4544887c7f496f2b2312727fe7bcb64a6d6c8.tar.gz
volse-hubzilla-cbf4544887c7f496f2b2312727fe7bcb64a6d6c8.tar.bz2
volse-hubzilla-cbf4544887c7f496f2b2312727fe7bcb64a6d6c8.zip
added index to config and pconfig table
changed config.php to use REPLACE instead of INSERT, this removes one db hit.
Diffstat (limited to 'database.sql')
-rw-r--r--[-rwxr-xr-x]database.sql14
1 files changed, 8 insertions, 6 deletions
diff --git a/database.sql b/database.sql
index 327b482c0..a039746e8 100755..100644
--- a/database.sql
+++ b/database.sql
@@ -34,10 +34,11 @@ CREATE TABLE IF NOT EXISTS `challenge` (
CREATE TABLE IF NOT EXISTS `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `cat` char(255) NOT NULL,
- `k` char(255) NOT NULL,
+ `cat` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL,
+ `k` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL,
`v` text NOT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `access`(`cat`,`k`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -536,9 +537,10 @@ INDEX ( `batch` )
CREATE TABLE IF NOT EXISTS `pconfig` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`uid` INT NOT NULL DEFAULT '0',
-`cat` CHAR( 255 ) NOT NULL ,
-`k` CHAR( 255 ) NOT NULL ,
-`v` MEDIUMTEXT NOT NULL
+`cat` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL ,
+`k` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL ,
+`v` MEDIUMTEXT NOT NULL,
+UNIQUE KEY `access`(`cat`, `k`)
) ENGINE = MyISAM DEFAULT CHARSET=utf8;