Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| first_name | text | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_name | text | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| title | text | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_id | serial | 10 | √ | nextval('moped_users_user_id_seq'::regclass) | 
                                        
  | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workgroup_id | int4 | 10 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cognito_user_id | uuid | 2147483647 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| date_added | timestamptz | 35,6 | √ | clock_timestamp() | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_coa_staff | bool | 1 | false | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| citext | 2147483647 | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| roles | jsonb | 2147483647 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| picture | text | 2147483647 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_deleted | bool | 1 | false | 
                                         | 
                                    
                                         | 
                                    Indicates soft deletion  | 
                                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_user_group_member | bool | 1 | false | 
                                         | 
                                    
                                         | 
                                    Tracks if the user is a member of the Moped User Group, aka the MUG.  | 
                                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| note | text | 2147483647 | √ | null | 
                                         | 
                                    
                                         | 
                                    A place to add any notes about this user, e.g. why they were deactivated.  | 
                                |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_seen_date | timestamptz | 35,6 | √ | null | 
                                         | 
                                    
                                         | 
                                    Tracks the last time a user loaded the Moped app in their browser. This value is set by the set_last_seen_date function. This value is not 100% reliable because it is updated by an API call that can be blocked by the client.  | 
                                
Indexes
| Constraint Name | Type | Sort | Column(s) | 
|---|---|---|---|
| moped_users_pkey | Primary key | Asc | user_id | 
| moped_users_cognito_user_id_key | Must be unique | Asc | cognito_user_id | 
| moped_users_email_key | Must be unique | Asc | |
| moped_users_unique_email_idx | Must be unique | Asc | |
| moped_users_user_id_key | Must be unique | Asc | user_id |