summaryrefslogtreecommitdiff
path: root/install.sql
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-01 02:04:42 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-01 02:04:42 +1000
commitb51fc38783c1b93f1667ea4fb41a077de66dad49 (patch)
treed6c8db4f1306c97189b8eff724b1bb307245db2f /install.sql
parentc567131ca703a8bda0c3b1ca83fa2cae5af863a4 (diff)
Some SQL and indexes improvements
Diffstat (limited to 'install.sql')
-rw-r--r--install.sql11
1 files changed, 7 insertions, 4 deletions
diff --git a/install.sql b/install.sql
index e52f1f89..1980f8bb 100644
--- a/install.sql
+++ b/install.sql
@@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `bans` (
`board` varchar(58) CHARACTER SET utf8 DEFAULT NULL,
`seen` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
- FULLTEXT KEY `ip` (`ip`)
+ KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -115,7 +115,8 @@ CREATE TABLE IF NOT EXISTS `modlogs` (
`board` varchar(58) CHARACTER SET utf8 DEFAULT NULL,
`time` int(11) NOT NULL,
`text` text NOT NULL,
- KEY `time` (`time`)
+ KEY `time` (`time`),
+ KEY `mod`(`mod`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
@@ -182,7 +183,8 @@ CREATE TABLE IF NOT EXISTS `noticeboard` (
`time` int(11) NOT NULL,
`subject` text NOT NULL,
`body` text NOT NULL,
- UNIQUE KEY `id` (`id`)
+ UNIQUE KEY `id` (`id`),
+ KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -198,7 +200,8 @@ CREATE TABLE IF NOT EXISTS `pms` (
`message` text NOT NULL,
`time` int(11) NOT NULL,
`unread` tinyint(1) NOT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `to` (`to`, `unread`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------