comparison SQL/mysql.initial.sql @ 8:bf99236cc5cd

try to recover from upgrade fail
author Charlie Root
date Sat, 29 Dec 2018 07:07:34 -0500
parents 4681f974d28b
children
comparison
equal deleted inserted replaced
7:65fd7d441cf1 8:bf99236cc5cd
5 5
6 -- Table structure for table `session` 6 -- Table structure for table `session`
7 7
8 CREATE TABLE `session` ( 8 CREATE TABLE `session` (
9 `sess_id` varchar(128) NOT NULL, 9 `sess_id` varchar(128) NOT NULL,
10 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
11 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 10 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
12 `ip` varchar(40) NOT NULL, 11 `ip` varchar(40) NOT NULL,
13 `vars` mediumtext NOT NULL, 12 `vars` mediumtext NOT NULL,
14 PRIMARY KEY(`sess_id`), 13 PRIMARY KEY(`sess_id`),
15 INDEX `changed_index` (`changed`) 14 INDEX `changed_index` (`changed`)
22 `user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, 21 `user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
23 `username` varchar(128) BINARY NOT NULL, 22 `username` varchar(128) BINARY NOT NULL,
24 `mail_host` varchar(128) NOT NULL, 23 `mail_host` varchar(128) NOT NULL,
25 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 24 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
26 `last_login` datetime DEFAULT NULL, 25 `last_login` datetime DEFAULT NULL,
26 `failed_login` datetime DEFAULT NULL,
27 `failed_login_counter` int(10) UNSIGNED DEFAULT NULL,
27 `language` varchar(5), 28 `language` varchar(5),
28 `preferences` longtext, 29 `preferences` longtext,
29 PRIMARY KEY(`user_id`), 30 PRIMARY KEY(`user_id`),
30 UNIQUE `username` (`username`, `mail_host`) 31 UNIQUE `username` (`username`, `mail_host`)
31 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; 32 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
34 -- Table structure for table `cache` 35 -- Table structure for table `cache`
35 36
36 CREATE TABLE `cache` ( 37 CREATE TABLE `cache` (
37 `user_id` int(10) UNSIGNED NOT NULL, 38 `user_id` int(10) UNSIGNED NOT NULL,
38 `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL, 39 `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
39 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 40 `expires` datetime DEFAULT NULL,
40 `expires` datetime DEFAULT NULL, 41 `data` longtext NOT NULL,
41 `data` longtext NOT NULL, 42 PRIMARY KEY (`user_id`, `cache_key`),
42 CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) 43 CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
43 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, 44 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
44 INDEX `expires_index` (`expires`), 45 INDEX `expires_index` (`expires`)
45 INDEX `user_cache_index` (`user_id`,`cache_key`)
46 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; 46 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
47 47
48 48
49 -- Table structure for table `cache_shared` 49 -- Table structure for table `cache_shared`
50 50
51 CREATE TABLE `cache_shared` ( 51 CREATE TABLE `cache_shared` (
52 `cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL, 52 `cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
53 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 53 `expires` datetime DEFAULT NULL,
54 `expires` datetime DEFAULT NULL, 54 `data` longtext NOT NULL,
55 `data` longtext NOT NULL, 55 PRIMARY KEY (`cache_key`),
56 INDEX `expires_index` (`expires`), 56 INDEX `expires_index` (`expires`)
57 INDEX `cache_key_index` (`cache_key`)
58 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; 57 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
59 58
60 59
61 -- Table structure for table `cache_index` 60 -- Table structure for table `cache_index`
62 61
173 172
174 173
175 -- Table structure for table `dictionary` 174 -- Table structure for table `dictionary`
176 175
177 CREATE TABLE `dictionary` ( 176 CREATE TABLE `dictionary` (
178 `user_id` int(10) UNSIGNED DEFAULT NULL, 177 `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, -- redundant, for compat. with Galera Cluster
178 `user_id` int(10) UNSIGNED DEFAULT NULL, -- NULL here is for "shared dictionaries"
179 `language` varchar(5) NOT NULL, 179 `language` varchar(5) NOT NULL,
180 `data` longtext NOT NULL, 180 `data` longtext NOT NULL,
181 CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`) 181 CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`)
182 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, 182 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
183 UNIQUE `uniqueness` (`user_id`, `language`) 183 UNIQUE `uniqueness` (`user_id`, `language`)
207 PRIMARY KEY(`name`) 207 PRIMARY KEY(`name`)
208 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; 208 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
209 209
210 /*!40014 SET FOREIGN_KEY_CHECKS=1 */; 210 /*!40014 SET FOREIGN_KEY_CHECKS=1 */;
211 211
212 INSERT INTO system (name, value) VALUES ('roundcube-version', '2015030800'); 212 INSERT INTO system (name, value) VALUES ('roundcube-version', '2016112200');