Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. DROP TABLE IF EXISTS `users`;
  2. CREATE TABLE `users` (
  3. `id` int unsigned NOT NULL AUTO_INCREMENT,
  4. `role_id` int unsigned NOT NULL DEFAULT '1',
  5. `username` varchar(80) NOT NULL DEFAULT '',
  6. `password` varchar(120) NOT NULL,
  7. `email` varchar(80) NOT NULL,
  8. `super_admin` enum('yes','no') DEFAULT 'no',
  9. `super_user` enum('yes','no') DEFAULT 'no',
  10. `activation_code` varchar(120) DEFAULT NULL,
  11. `remember_me` longtext,
  12. `language` varchar(10) DEFAULT 'en_us',
  13. `father_id` int unsigned,
  14. `client_id` int unsigned,
  15. `last_login` int unsigned DEFAULT NULL,
  16. `status` enum('banned','inactive','active') NOT NULL DEFAULT 'inactive',
  17. FOREIGN KEY (`client_id`) REFERENCES `paasCI`.`clients` ON UPDATE CASCADE ON DELETE SET NULL,
  18. FOREIGN KEY (`father_id`) REFERENCES `paasCI`.`users` ON UPDATE CASCADE ON DELETE SET NULL,
  19. UNIQUE KEY `uniq_username` (`username`),
  20. UNIQUE KEY `uniq_email` (`email`),
  21. PRIMARY KEY (`id`,`role_id`)
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement