Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| session_id | text | 2147483647 | (gen_random_uuid())::text |
|
|
||||||
| user_id | int4 | 10 | null |
|
|
||||||
| ip_address | text | 2147483647 | √ | null |
|
|
|||||
| user_agent | text | 2147483647 | √ | null |
|
|
|||||
| device_info | text | 2147483647 | √ | null |
|
|
|||||
| created_at | timestamp | 26,3 | CURRENT_TIMESTAMP |
|
|
||||||
| last_used_at | timestamp | 26,3 | √ | null |
|
|
|||||
| revoked_at | timestamp | 26,3 | √ | null |
|
|
|||||
| expires_at | timestamp | 26,3 | null |
|
|
||||||
| is_active | bool | 1 | true |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| sessions_pkey | Primary key | Asc | session_id |
| idx_sessions_user_id | Performance | Asc | user_id |
| sessions_user_id_is_active_idx | Performance | Asc/Asc | user_id + is_active |

