Advertisement
Guest User

table editrecords

a guest
Jun 28th, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.50 KB | None | 0 0
  1. | editrecords | CREATE TABLE `editrecords` (
  2.   `id` int(11) NOT NULL AUTO_INCREMENT,
  3.   `test_id` int(11) NOT NULL,
  4.   `user_id` int(11) NOT NULL,
  5.   `date` datetime DEFAULT NULL,
  6.   PRIMARY KEY (`id`),
  7.   KEY `test_id` (`test_id`),
  8.   KEY `user_id` (`user_id`),
  9.   CONSTRAINT `editrecords_ibfk_1` FOREIGN KEY (`test_id`) REFERENCES `tests` (`id`) ON DELETE CASCADE,
  10.   CONSTRAINT `editrecords_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
  11. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement