Supabase Database Schema Diagram
Every Supabase project ships with an auth schema that powers authentication, sessions, and user management. This is the full database schema diagram of the Supabase auth tables — auth.users, auth.identities, auth.sessions, and friends — showing the primary keys and foreign key relationships between them. Use it to understand how Supabase stores users before you build your own profiles table.
Tables in the Supabase schema
| Column | Type | Nullable | Key |
|---|---|---|---|
| users | |||
| instance_id | uuid | Yes | — |
| id | uuid | No | PK |
| aud | varchar(255) | Yes | — |
| role | varchar(255) | Yes | — |
| varchar(255) | Yes | — | |
| encrypted_password | varchar(255) | Yes | — |
| email_confirmed_at | timestamptz | Yes | — |
| invited_at | timestamptz | Yes | — |
| confirmation_token | varchar(255) | Yes | — |
| confirmation_sent_at | timestamptz | Yes | — |
| recovery_token | varchar(255) | Yes | — |
| recovery_sent_at | timestamptz | Yes | — |
| email_change_token_current | varchar(255) | Yes | — |
| email_change_token_new | varchar(255) | Yes | — |
| email_change | varchar(255) | Yes | — |
| email_change_sent_at | timestamptz | Yes | — |
| last_sign_in_at | timestamptz | Yes | — |
| raw_app_meta_data | jsonb | Yes | — |
| raw_user_meta_data | jsonb | Yes | — |
| is_super_admin | bool | Yes | — |
| created_at | timestamptz | Yes | — |
| updated_at | timestamptz | Yes | — |
| phone | text | Yes | — |
| phone_confirmed_at | timestamptz | Yes | — |
| phone_change | text | Yes | — |
| phone_change_token | varchar(255) | Yes | — |
| phone_change_sent_at | timestamptz | Yes | — |
| confirmed_at | timestamptz | Yes | — |
| email_change_confirm_status | smallint | Yes | — |
| banned_until | timestamptz | Yes | — |
| reauthentication_token | varchar(255) | Yes | — |
| reauthentication_sent_at | timestamptz | Yes | — |
| is_sso_user | bool | No | — |
| deleted_at | timestamptz | Yes | — |
| is_anonymous | bool | No | — |
| identities | |||
| provider_id | text | Yes | — |
| user_id | uuid | No | — |
| identity_data | jsonb | No | — |
| provider | text | No | — |
| last_sign_in_at | timestamptz | Yes | — |
| created_at | timestamptz | Yes | — |
| updated_at | timestamptz | Yes | — |
| text | Yes | — | |
| id | text | No | PK |
| sessions | |||
| id | uuid | No | PK |
| user_id | uuid | No | — |
| created_at | timestamptz | Yes | — |
| updated_at | timestamptz | Yes | — |
| factor_id | uuid | Yes | — |
| aal | aal_level | Yes | — |
| not_after | timestamptz | Yes | — |
| refreshed_at | timestamptz | Yes | — |
| user_agent | text | Yes | — |
| ip | inet | Yes | — |
| tag | text | Yes | — |
| refresh_tokens | |||
| instance_id | uuid | Yes | — |
| id | bigint | No | PK |
| token | varchar(255) | Yes | — |
| user_id | varchar(255) | Yes | — |
| revoked | bool | Yes | — |
| created_at | timestamptz | Yes | — |
| updated_at | timestamptz | Yes | — |
| parent | varchar(255) | Yes | — |
| session_id | uuid | Yes | — |
| instances | |||
| id | uuid | No | PK |
| uuid | uuid | Yes | — |
| raw_base_config | text | Yes | — |
| created_at | timestamptz | Yes | — |
| updated_at | timestamptz | Yes | — |
| audit_log_entries | |||
| instance_id | uuid | Yes | — |
| id | uuid | No | PK |
| payload | json | Yes | — |
| created_at | timestamptz | Yes | — |
| ip_address | varchar(64) | Yes | — |
| schema_migrations | |||
| version | varchar(255) | No | PK |
Frequently asked questions
How many tables does the Supabase auth schema have?
The standard Supabase auth schema has 7 core tables: users, identities, sessions, refresh_tokens, instances, audit_log_entries, and schema_migrations.
How do users relate to identities in Supabase?
Every auth.users row can have multiple auth.identities rows linked by user_id. Each identity represents a sign-in method (email/password, Google, GitHub, etc.) for that user.
Visualize your own database
Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.
Try it free →