comparison SQL/mysql/2011092800.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 -- Updates from version 0.6
2
3 /*!40014 SET FOREIGN_KEY_CHECKS=0 */;
4
5 ALTER TABLE `users` CHANGE `alias` `alias` varchar(128) BINARY NOT NULL;
6 ALTER TABLE `users` CHANGE `username` `username` varchar(128) BINARY NOT NULL;
7
8 CREATE TABLE `dictionary` (
9 `user_id` int(10) UNSIGNED DEFAULT NULL,
10 `language` varchar(5) NOT NULL,
11 `data` longtext NOT NULL,
12 CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`)
13 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
14 UNIQUE `uniqueness` (`user_id`, `language`)
15 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
16
17 CREATE TABLE `searches` (
18 `search_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
19 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
20 `type` int(3) NOT NULL DEFAULT '0',
21 `name` varchar(128) NOT NULL,
22 `data` text,
23 PRIMARY KEY(`search_id`),
24 CONSTRAINT `user_id_fk_searches` FOREIGN KEY (`user_id`)
25 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
26 UNIQUE `uniqueness` (`user_id`, `type`, `name`)
27 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
28
29 DROP TABLE `messages`;
30
31 CREATE TABLE `cache_index` (
32 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
33 `mailbox` varchar(255) BINARY NOT NULL,
34 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
35 `valid` tinyint(1) NOT NULL DEFAULT '0',
36 `data` longtext NOT NULL,
37 CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`)
38 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
39 INDEX `changed_index` (`changed`),
40 PRIMARY KEY (`user_id`, `mailbox`)
41 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
42
43 CREATE TABLE `cache_thread` (
44 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
45 `mailbox` varchar(255) BINARY NOT NULL,
46 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
47 `data` longtext NOT NULL,
48 CONSTRAINT `user_id_fk_cache_thread` FOREIGN KEY (`user_id`)
49 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
50 INDEX `changed_index` (`changed`),
51 PRIMARY KEY (`user_id`, `mailbox`)
52 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
53
54 CREATE TABLE `cache_messages` (
55 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
56 `mailbox` varchar(255) BINARY NOT NULL,
57 `uid` int(11) UNSIGNED NOT NULL DEFAULT '0',
58 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
59 `data` longtext NOT NULL,
60 `flags` int(11) NOT NULL DEFAULT '0',
61 CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`)
62 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
63 INDEX `changed_index` (`changed`),
64 PRIMARY KEY (`user_id`, `mailbox`, `uid`)
65 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
66
67 /*!40014 SET FOREIGN_KEY_CHECKS=1 */;