users table

The users table in the Blog Database Schema schema has 10 columns, keyed by id. 4 columns in posts, post_revisions, media and comments reference it.

Authors, editors and admins in one table, separated by role. The slug powers /author/jane-doe.

Columns (10)

Columns of the users table
ColumnTypeConstraintsDescription
iduuidprimary key
emailvarchar(255)unique, not null
slugvarchar(80)unique, not null
display_namevarchar(120)not null
roleuser_rolenot null
biovarchar(1000)
avatar_urlvarchar(500)
websitevarchar(255)
is_activebooleannot null
created_attimestamptznot null

Indexes (1)

  • (role, is_active)

Relationships