You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2016112200.sql 1.0KB

123456789101112131415161718192021222324
  1. ALTER TABLE `dictionary` ADD COLUMN `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; -- redundant, for compat. with Galera Cluster
  2. DROP TABLE `cache`;
  3. DROP TABLE `cache_shared`;
  4. CREATE TABLE `cache` (
  5. `user_id` int(10) UNSIGNED NOT NULL,
  6. `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
  7. `expires` datetime DEFAULT NULL,
  8. `data` longtext NOT NULL,
  9. PRIMARY KEY (`user_id`, `cache_key`),
  10. CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
  11. REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  12. INDEX `expires_index` (`expires`)
  13. ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
  14. CREATE TABLE `cache_shared` (
  15. `cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
  16. `expires` datetime DEFAULT NULL,
  17. `data` longtext NOT NULL,
  18. PRIMARY KEY (`cache_key`),
  19. INDEX `expires_index` (`expires`)
  20. ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;