← All schemas
Schema Library

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
7
Schema
auth
Core table
auth.users
* 1 * 1 * 1 users instance_id id PK aud role email encrypted_password email_confirmed_at invited_at confirmation_token confirmation_sent_at recovery_token recovery_sent_at email_change_token_current email_change_token_new email_change email_change_sent_at last_sign_in_at raw_app_meta_data raw_user_meta_data is_super_admin created_at updated_at phone phone_confirmed_at phone_change phone_change_token phone_change_sent_at confirmed_at email_change_confirm_status banned_until reauthentication_token reauthentication_sent_at is_sso_user deleted_at is_anonymous identities provider_id user_id FK identity_data provider last_sign_in_at created_at updated_at email id PK sessions id PK user_id FK created_at updated_at factor_id aal not_after refreshed_at user_agent ip tag refresh_tokens instance_id id PK token user_id FK revoked created_at updated_at parent session_id instances id PK uuid raw_base_config created_at updated_at audit_log_entries instance_id id PK payload created_at ip_address schema_migrations version PK

Tables in the Supabase schema

ColumnTypeNullableKey
users
instance_iduuidYes
iduuidNoPK
audvarchar(255)Yes
rolevarchar(255)Yes
emailvarchar(255)Yes
encrypted_passwordvarchar(255)Yes
email_confirmed_attimestamptzYes
invited_attimestamptzYes
confirmation_tokenvarchar(255)Yes
confirmation_sent_attimestamptzYes
recovery_tokenvarchar(255)Yes
recovery_sent_attimestamptzYes
email_change_token_currentvarchar(255)Yes
email_change_token_newvarchar(255)Yes
email_changevarchar(255)Yes
email_change_sent_attimestamptzYes
last_sign_in_attimestamptzYes
raw_app_meta_datajsonbYes
raw_user_meta_datajsonbYes
is_super_adminboolYes
created_attimestamptzYes
updated_attimestamptzYes
phonetextYes
phone_confirmed_attimestamptzYes
phone_changetextYes
phone_change_tokenvarchar(255)Yes
phone_change_sent_attimestamptzYes
confirmed_attimestamptzYes
email_change_confirm_statussmallintYes
banned_untiltimestamptzYes
reauthentication_tokenvarchar(255)Yes
reauthentication_sent_attimestamptzYes
is_sso_userboolNo
deleted_attimestamptzYes
is_anonymousboolNo
identities
provider_idtextYes
user_iduuidNo
identity_datajsonbNo
providertextNo
last_sign_in_attimestamptzYes
created_attimestamptzYes
updated_attimestamptzYes
emailtextYes
idtextNoPK
sessions
iduuidNoPK
user_iduuidNo
created_attimestamptzYes
updated_attimestamptzYes
factor_iduuidYes
aalaal_levelYes
not_aftertimestamptzYes
refreshed_attimestamptzYes
user_agenttextYes
ipinetYes
tagtextYes
refresh_tokens
instance_iduuidYes
idbigintNoPK
tokenvarchar(255)Yes
user_idvarchar(255)Yes
revokedboolYes
created_attimestamptzYes
updated_attimestamptzYes
parentvarchar(255)Yes
session_iduuidYes
instances
iduuidNoPK
uuiduuidYes
raw_base_configtextYes
created_attimestamptzYes
updated_attimestamptzYes
audit_log_entries
instance_iduuidYes
iduuidNoPK
payloadjsonYes
created_attimestamptzYes
ip_addressvarchar(64)Yes
schema_migrations
versionvarchar(255)NoPK

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 →