Mercurial > hg > rc2
comparison SQL/mysql/2013061000.sql @ 0:4681f974d28b
vanilla 1.3.3 distro, I hope
author | Charlie Root |
---|---|
date | Thu, 04 Jan 2018 15:52:31 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4681f974d28b |
---|---|
1 ALTER TABLE `cache` ADD `expires` datetime DEFAULT NULL; | |
2 ALTER TABLE `cache_shared` ADD `expires` datetime DEFAULT NULL; | |
3 ALTER TABLE `cache_index` ADD `expires` datetime DEFAULT NULL; | |
4 ALTER TABLE `cache_thread` ADD `expires` datetime DEFAULT NULL; | |
5 ALTER TABLE `cache_messages` ADD `expires` datetime DEFAULT NULL; | |
6 | |
7 -- initialize expires column with created/changed date + 7days | |
8 UPDATE `cache` SET `expires` = `created` + interval 604800 second; | |
9 UPDATE `cache_shared` SET `expires` = `created` + interval 604800 second; | |
10 UPDATE `cache_index` SET `expires` = `changed` + interval 604800 second; | |
11 UPDATE `cache_thread` SET `expires` = `changed` + interval 604800 second; | |
12 UPDATE `cache_messages` SET `expires` = `changed` + interval 604800 second; | |
13 | |
14 ALTER TABLE `cache` DROP INDEX `created_index`; | |
15 ALTER TABLE `cache_shared` DROP INDEX `created_index`; | |
16 ALTER TABLE `cache_index` DROP `changed`; | |
17 ALTER TABLE `cache_thread` DROP `changed`; | |
18 ALTER TABLE `cache_messages` DROP `changed`; | |
19 | |
20 ALTER TABLE `cache` ADD INDEX `expires_index` (`expires`); | |
21 ALTER TABLE `cache_shared` ADD INDEX `expires_index` (`expires`); | |
22 ALTER TABLE `cache_index` ADD INDEX `expires_index` (`expires`); | |
23 ALTER TABLE `cache_thread` ADD INDEX `expires_index` (`expires`); | |
24 ALTER TABLE `cache_messages` ADD INDEX `expires_index` (`expires`); |