summaryrefslogtreecommitdiffstats
path: root/modules-available/news
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-29 16:13:37 +0100
committerSimon Rettberg2017-11-29 16:13:37 +0100
commit9da6560177a2e7898c7ca07ce4b3f0bc13ec2811 (patch)
tree17116cd979877c3a85108cf4eac66365388779c4 /modules-available/news
parent[inc/Paginate] Use Count(*) instead of SQL_CALC_FOUND_ROWS, which is faster (diff)
downloadslx-admin-9da6560177a2e7898c7ca07ce4b3f0bc13ec2811.tar.gz
slx-admin-9da6560177a2e7898c7ca07ce4b3f0bc13ec2811.tar.xz
slx-admin-9da6560177a2e7898c7ca07ce4b3f0bc13ec2811.zip
[news] install: Better index for table
Diffstat (limited to 'modules-available/news')
-rw-r--r--modules-available/news/install.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/news/install.inc.php b/modules-available/news/install.inc.php
index 620a4580..e5e52256 100644
--- a/modules-available/news/install.inc.php
+++ b/modules-available/news/install.inc.php
@@ -27,9 +27,11 @@ $res[] = tableCreate('vmchooser_pages', "
`content` text,
`type` varchar(10),
PRIMARY KEY (`newsid`),
- KEY `dateline` (`dateline`)
+ KEY `type` (`type`, `dateline`)
");
+Database::exec('ALTER TABLE vmchooser_pages DROP KEY `dateline`, ADD KEY `type` (`type`, `dateline`)');
+
// Create response for browser
if (in_array(UPDATE_DONE, $res)) {