user_avatar_items table

The user_avatar_items table in the Reddit Clone Database Schema schema has 4 columns, with 2 foreign keys to users and avatar_assets.

Ownership and outfit in one row. Uniqueness of the equipped item per slot is enforced by a partial index in the real deployment, not by a column here.

Columns (4)

Columns of the user_avatar_items table
ColumnTypeConstraintsDescription
user_iduuidnot null, references users.id
asset_iduuidnot null, references avatar_assets.id
is_equippedbooleannot null
acquired_attimestamptznot null

Indexes (1)

  • (user_id, is_equipped)

Relationships