From 366bdf54a604467d33377902230c43dda6c0309f Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 28 May 2020 19:37:54 +0200 Subject: [PATCH] User/Cookies * additional fixes against announcements not staying closed --- setup/db_structure.sql | 6 +++--- setup/updates/1590687329_01.sql | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 setup/updates/1590687329_01.sql diff --git a/setup/db_structure.sql b/setup/db_structure.sql index 7314ae64..127da389 100644 --- a/setup/db_structure.sql +++ b/setup/db_structure.sql @@ -100,8 +100,8 @@ CREATE TABLE `aowow_account_cookies` ( `userId` int(10) unsigned NOT NULL, `name` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL, `data` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, - PRIMARY KEY (`userId`), - UNIQUE KEY `userId_name` (`userId`,`name`), + INDEX `userId` (`userId`) USING BTREE, + UNIQUE KEY `userId_name` (`userId`,`name`) USING BTREE, CONSTRAINT `FK_acc_cookies` FOREIGN KEY (`userId`) REFERENCES `aowow_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3138,7 +3138,7 @@ UNLOCK TABLES; LOCK TABLES `aowow_dbversion` WRITE; /*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */; -INSERT INTO `aowow_dbversion` VALUES (1590506555,0,NULL,NULL); +INSERT INTO `aowow_dbversion` VALUES (1590687330,0,NULL,NULL); /*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */; UNLOCK TABLES; diff --git a/setup/updates/1590687329_01.sql b/setup/updates/1590687329_01.sql new file mode 100644 index 00000000..3064d01c --- /dev/null +++ b/setup/updates/1590687329_01.sql @@ -0,0 +1 @@ +ALTER TABLE `aowow_account_cookies` DROP PRIMARY KEY, ADD INDEX `userId` (`userId`) USING BTREE;