mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Cleanup relation schema
This commit is contained in:
parent
781a9ae216
commit
a8d253fa2e
10 changed files with 404 additions and 291 deletions
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue