mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
DB/Setup
* fix erronous foreign key constraint revealed by MySQL 8.4
This commit is contained in:
@@ -209,7 +209,7 @@ CREATE TABLE `aowow_account_weightscales` (
|
|||||||
`name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
`class` tinyint(3) unsigned NOT NULL DEFAULT 0,
|
`class` tinyint(3) unsigned NOT NULL DEFAULT 0,
|
||||||
`icon` varchar(48) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
`icon` varchar(48) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY (`id`,`userId`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `FK_acc_weights` (`userId`),
|
KEY `FK_acc_weights` (`userId`),
|
||||||
CONSTRAINT `FK_acc_weights` FOREIGN KEY (`userId`) REFERENCES `aowow_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
CONSTRAINT `FK_acc_weights` 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;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;
|
||||||
@@ -3250,7 +3250,7 @@ UNLOCK TABLES;
|
|||||||
|
|
||||||
LOCK TABLES `aowow_dbversion` WRITE;
|
LOCK TABLES `aowow_dbversion` WRITE;
|
||||||
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
|
||||||
INSERT INTO `aowow_dbversion` VALUES (1709133536,0,NULL,NULL);
|
INSERT INTO `aowow_dbversion` VALUES (1716305877,0,NULL,NULL);
|
||||||
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|||||||
7
setup/updates/1716305876_01.sql
Normal file
7
setup/updates/1716305876_01.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
SET foreign_key_checks = 0;
|
||||||
|
|
||||||
|
ALTER TABLE `aowow_account_weightscales`
|
||||||
|
DROP PRIMARY KEY,
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
SET foreign_key_checks = 1;
|
||||||
Reference in New Issue
Block a user