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