users.sql 970 B

12345678910111213141516171819202122232425262728293031323334353637
  1. -- --------------------------------------------------------
  2. --
  3. -- Table structure for table `users`
  4. --
  5. -- Creation: Aug 20, 2015 at 10:05 PM
  6. --
  7. DROP TABLE IF EXISTS `users`;
  8. CREATE TABLE IF NOT EXISTS `users` (
  9. `id` int(10) NOT NULL,
  10. `name` varchar(50) COLLATE utf8_bin NOT NULL,
  11. `email` varchar(254) COLLATE utf8_bin NOT NULL,
  12. `date_registered` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  13. `date_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  14. `password` varchar(256) COLLATE utf8_bin NOT NULL,
  15. `salt` varchar(256) COLLATE utf8_bin NOT NULL,
  16. `active` tinyint(1) NOT NULL DEFAULT '0'
  17. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  18. --
  19. -- RELATIONS FOR TABLE `users`:
  20. --
  21. --
  22. -- Indexes for table `users`
  23. --
  24. ALTER TABLE `users`
  25. ADD PRIMARY KEY (`id`),
  26. ADD UNIQUE KEY `name` (`name`),
  27. ADD UNIQUE KEY `email` (`email`);
  28. --
  29. -- AUTO_INCREMENT for table `users`
  30. --
  31. ALTER TABLE `users`
  32. MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;