Guest User

Untitled

a guest
Nov 18th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. CREATE TABLE `tournament_session` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `object_id` int(11) NULL DEFAULT NULL,
  4. `subject_id` int(11) NULL DEFAULT NULL,
  5. `is_evaluated` BIT(1) DEFAULT 0b00,
  6. `created_at` TIMESTAMP NOT NULL,
  7. `updated_at` TIMESTAMP NULL DEFAULT NULL,
  8. PRIMARY KEY (`id`) USING BTREE,
  9. INDEX `idx-tournament_session-id`(`id`) USING BTREE,
  10. INDEX `fk-tournament_session-subject_id`(`subject_id`) USING BTREE,
  11. CONSTRAINT `fk-tournament_session-subject_id` FOREIGN KEY (`subject_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  12. INDEX `fk-tournament_session-object_id`(`object_id`) USING BTREE,
  13. CONSTRAINT `fk-tournament_session-object_id` FOREIGN KEY (`object_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  14. ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;
Add Comment
Please, Sign In to add comment