Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. desc users;
  2. +----------+--------------+------+-----+---------+----------------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +----------+--------------+------+-----+---------+----------------+
  5. | id | int(11) | NO | PRI | NULL | auto_increment |
  6. | email | varchar(255) | NO | | NULL | |
  7. | password | varchar(255) | NO | | NULL | |
  8. | created | datetime | YES | | NULL | |
  9. | updated | datetime | YES | | NULL | |
  10. +----------+--------------+------+-----+---------+----------------+
  11. 5 rows in set (0.22 sec)
  12.  
  13. select * from users;
  14. +----+--------------------------+--------------------------------------------------------------+---------------------+---------+
  15. | id | email | password | created | updated |
  16. +----+--------------------------+--------------------------------------------------------------+---------------------+---------+
  17. | 1 | email0@gmail.com | $2y$10$zKFFxsZ/udZek27d62DvSO6k3i9wcxu18VnI77ruR6L9iqLKjadwC | 2015-04-01 01:35:36 | NULL |
  18. | 2 | email1@gmail.com | $2y$10$JNLnk6kGlcBu61ABpDLXB.zW66Bk3IxJJ7wuJNyPuuFk6BBTq1jsS | 2015-04-03 23:10:43 | NULL |
  19. +----+--------------------------+--------------------------------------------------------------+---------------------+---------+
  20.  
  21. desc roles;
  22. +-------+-------------+------+-----+---------+----------------+
  23. | Field | Type | Null | Key | Default | Extra |
  24. +-------+-------------+------+-----+---------+----------------+
  25. | id | int(11) | NO | PRI | NULL | auto_increment |
  26. | name | varchar(20) | NO | | NULL | |
  27. +-------+-------------+------+-----+---------+----------------+
  28. 2 rows in set (0.02 sec)
  29.  
  30. select * from roles;
  31. +----+---------------+
  32. | id | name |
  33. +----+---------------+
  34. | 1 | administrator |
  35. | 2 | creator |
  36. | 3 | viewer |
  37. +----+---------------+
  38. 3 rows in set (0.00 sec)
  39.  
  40. desc user_roles;
  41. +---------+----------+------+-----+---------+----------------+
  42. | Field | Type | Null | Key | Default | Extra |
  43. +---------+----------+------+-----+---------+----------------+
  44. | id | int(11) | NO | PRI | NULL | auto_increment |
  45. | user_id | int(11) | NO | MUL | NULL | |
  46. | role_id | int(11) | NO | MUL | NULL | |
  47. | created | datetime | YES | | NULL | |
  48. | updated | datetime | YES | | NULL | |
  49. +---------+----------+------+-----+---------+----------------+
  50. 5 rows in set (0.02 sec)
  51.  
  52. select * from user_roles;
  53. +----+---------+---------+---------+---------+
  54. | id | user_id | role_id | created | updated |
  55. +----+---------+---------+---------+---------+
  56. | 1 | 1 | 1 | NULL | NULL |
  57. | 2 | 1 | 2 | NULL | NULL |
  58. | 3 | 1 | 3 | NULL | NULL |
  59. | 4 | 2 | 3 | NULL | NULL |
  60. +----+---------+---------+---------+---------+
  61. 4 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement