Guest User

Untitled

a guest
Jul 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. SET NAMES utf8;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3.  
  4. DROP TABLE IF EXISTS `situations`;
  5.  
  6. CREATE TABLE `situations` (
  7. `sitid` int(6) unsigned NOT NULL auto_increment,
  8. `userid` tinyint(2) unsigned NOT NULL,
  9. `situation` varchar(100) character set utf8 collate utf8_unicode_ci NOT NULL,
  10. PRIMARY KEY (`sitid`),
  11. UNIQUE KEY `situation` (`situation`,`userid`),
  12. KEY `userid` (`userid`),
  13. CONSTRAINT `sit_userid` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE ON UPDATE CASCADE
  14. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  15.  
  16. SET FOREIGN_KEY_CHECKS = 1;
Add Comment
Please, Sign In to add comment