| # | Column Name | Nullable | Data Type | Max Length | Description |
|---|---|---|---|---|---|
| 1 | role_id | integer | 0 | The primary key of this table, which is also a serial field. | |
| 2 | role_code | character varying | 12 | ||
| 3 | role_name | character varying | 50 | ||
| 4 | is_admin | boolean | 0 | ||
| 5 | is_system | boolean | 0 | ||
| 6 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
| 7 | audit_ts | timestamp with time zone | 0 | Contains the date and timestamp of the last insert or update action. |
| # | Column Name | Key Name | References |
|---|---|---|---|
| 6 | audit_user_id | roles_audit_user_id_fkey | office.users.user_id |
| Index Name | Owner | Access Method | Definition | Description |
|---|---|---|---|---|
| roles_pkey | postgres | btree | role_id | |
| roles_role_name_uix | postgres | btree | upper(role_name::text) | |
| roles_role_code_uix | postgres | btree | upper(role_code::text) |
| Constraint Name | Description |
|---|
| # | Column Name | Default |
|---|---|---|
| 1 | role_id | nextval('office.roles_role_id_seq'::regclass) |
| 4 | is_admin | false |
| 5 | is_system | false |
| 7 | audit_ts | now() |
| Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
|---|