mysql select from roles ---- ------- ------------------- -------------

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
mysql> select * from roles;
+----+-------+-------------------+-----------------+---------------------+---------------------+
| id | name | authorizable_type | authorizable_id | created_at | updated_at |
+----+-------+-------------------+-----------------+---------------------+---------------------+
| 1 | admin | NULL | NULL | 2009-07-23 10:00:45 | 2009-07-23 10:00:45 |
| 2 | admin | User | NULL | 2009-07-23 13:52:01 | 2009-07-23 13:52:01 |
| 3 | admin | User | 1 | 2009-07-23 13:52:31 | 2009-07-23 13:52:31 |
+----+-------+-------------------+-----------------+---------------------+---------------------+
3 rows in set (0.00 sec)
mysql> select * from roles_users;
+----+---------+---------+---------------------+---------------------+
| id | user_id | role_id | created_at | updated_at |
+----+---------+---------+---------------------+---------------------+
| 1 | 1 | 1 | 2009-07-23 10:00:45 | 2009-07-23 10:00:45 |
| 2 | 1 | 2 | 2009-07-23 13:52:01 | 2009-07-23 13:52:01 |
| 3 | 1 | 3 | 2009-07-23 13:52:31 | 2009-07-23 13:52:31 |
+----+---------+---------+---------------------+---------------------+
3 rows in set (0.00 sec)