Cleanup relation schema

This commit is contained in:
Jorge Vargas 2025-02-25 22:14:16 -06:00
parent 781a9ae216
commit a8d253fa2e
10 changed files with 404 additions and 291 deletions

View file

@ -0,0 +1,12 @@
SET FOREIGN_KEY_CHECKS = 0;
-- DropForeignKey
ALTER TABLE `logs` DROP FOREIGN KEY `logs_ibfk_1`;
-- DropIndex
DROP INDEX `logs_ibfk_1` ON `logs`;
-- AddForeignKey
ALTER TABLE `logs` ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`username`) REFERENCES `users`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
SET FOREIGN_KEY_CHECKS = 1;