aowow/setup/sql/updates/1758578400_12.sql
Sarjuuk 647be4a946 Setup/SQL
* move sql files into its own folder.
 * move outdated updates out of the update folder, sorted by github tags
 * split up the db dump so my editor doesn't try to hang itself if i dare to touch that file
2025-09-25 18:44:48 +02:00

11 lines
441 B
SQL

ALTER TABLE `aowow_user_ratings`
DROP KEY `FK_acc_co_rate_user`,
DROP FOREIGN KEY `FK_userId`,
DROP PRIMARY KEY;
ALTER TABLE `aowow_user_ratings` MODIFY `userId` int unsigned NULL;
ALTER TABLE `aowow_user_ratings`
ADD UNIQUE KEY (`type`,`entry`,`userId`),
ADD KEY `FK_acc_co_rate_user` (`userId`),
ADD CONSTRAINT FK_userId FOREIGN KEY (`userId`) REFERENCES aowow_account(`id`) ON DELETE SET NULL ON UPDATE CASCADE;