Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DROP TABLE IF EXISTS `users`;
- CREATE TABLE `users` (
- `id` int unsigned NOT NULL AUTO_INCREMENT,
- `role_id` int unsigned NOT NULL DEFAULT '1',
- `username` varchar(80) NOT NULL DEFAULT '',
- `password` varchar(120) NOT NULL,
- `email` varchar(80) NOT NULL,
- `super_admin` enum('yes','no') DEFAULT 'no',
- `super_user` enum('yes','no') DEFAULT 'no',
- `activation_code` varchar(120) DEFAULT NULL,
- `remember_me` longtext,
- `language` varchar(10) DEFAULT 'en_us',
- `father_id` int unsigned,
- `client_id` int unsigned,
- `last_login` int unsigned DEFAULT NULL,
- `status` enum('banned','inactive','active') NOT NULL DEFAULT 'inactive',
- FOREIGN KEY (`client_id`) REFERENCES `paasCI`.`clients` ON UPDATE CASCADE ON DELETE SET NULL,
- FOREIGN KEY (`father_id`) REFERENCES `paasCI`.`users` ON UPDATE CASCADE ON DELETE SET NULL,
- UNIQUE KEY `uniq_username` (`username`),
- UNIQUE KEY `uniq_email` (`email`),
- PRIMARY KEY (`id`,`role_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement