daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Sep 12th, 2018 54 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. ALTER TABLE `rootthebox`.`snapshot_team`
  2. DROP FOREIGN KEY `snapshot_team_ibfk_1`;
  3. ALTER TABLE `rootthebox`.`snapshot_team`
  4. ADD CONSTRAINT `snapshot_team_ibfk_1`
  5.   FOREIGN KEY (`team_id`)
  6.   REFERENCES `rootthebox`.`team` (`id`)
  7.   ON DELETE CASCADE
  8.   ON UPDATE RESTRICT;
  9.  
  10. ALTER TABLE `rootthebox`.`snapshot_team_to_game_level`
  11. DROP FOREIGN KEY `snapshot_team_to_game_level_ibfk_1`,
  12. DROP FOREIGN KEY `snapshot_team_to_game_level_ibfk_2`;
  13. ALTER TABLE `rootthebox`.`snapshot_team_to_game_level`
  14. ADD CONSTRAINT `snapshot_team_to_game_level_ibfk_1`
  15.   FOREIGN KEY (`snapshot_team_id`)
  16.   REFERENCES `rootthebox`.`snapshot_team` (`id`)
  17.   ON DELETE CASCADE
  18.   ON UPDATE RESTRICT,
  19. ADD CONSTRAINT `snapshot_team_to_game_level_ibfk_2`
  20.   FOREIGN KEY (`gam_level_id`)
  21.   REFERENCES `rootthebox`.`game_level` (`id`)
  22.   ON DELETE NO ACTION;
  23.  
  24. ALTER TABLE `rootthebox`.`snapshot_to_snapshot_team`
  25. DROP FOREIGN KEY `snapshot_to_snapshot_team_ibfk_2`;
  26. ALTER TABLE `rootthebox`.`snapshot_to_snapshot_team`
  27. ADD CONSTRAINT `snapshot_to_snapshot_team_ibfk_2`
  28.   FOREIGN KEY (`snapshot_team_id`)
  29.   REFERENCES `rootthebox`.`snapshot_team` (`id`)
  30.   ON DELETE CASCADE;
  31.  
  32. ALTER TABLE `rootthebox`.`team_to_game_level`
  33. DROP FOREIGN KEY `team_to_game_level_ibfk_2`;
  34. ALTER TABLE `rootthebox`.`team_to_game_level`
  35. ADD CONSTRAINT `team_to_game_level_ibfk_2`
  36.   FOREIGN KEY (`game_level_id`)
  37.   REFERENCES `rootthebox`.`game_level` (`id`)
  38.   ON DELETE NO ACTION;
  39.  
  40. ALTER TABLE `rootthebox`.`team_to_game_level`
  41. DROP FOREIGN KEY `team_to_game_level_ibfk_1`;
  42. ALTER TABLE `rootthebox`.`team_to_game_level`
  43. ADD CONSTRAINT `team_to_game_level_ibfk_1`
  44.   FOREIGN KEY (`team_id`)
  45.   REFERENCES `rootthebox`.`team` (`id`)
  46.   ON DELETE CASCADE
  47.   ON UPDATE RESTRICT;
  48.  
  49. ALTER TABLE `rootthebox`.`user`
  50. DROP FOREIGN KEY `user_ibfk_1`;
  51. ALTER TABLE `rootthebox`.`user`
  52. ADD CONSTRAINT `user_ibfk_1`
  53.   FOREIGN KEY (`team_id`)
  54.   REFERENCES `rootthebox`.`team` (`id`)
  55.   ON DELETE SET NULL
  56.   ON UPDATE RESTRICT;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top