Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

2011092800.sql 2.8KB

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