Skip to content

Database Schema

James Jones edited this page Sep 19, 2024 · 11 revisions

Users

Column name Data Type Details
id int PK, not null
username string not null, unique
email string not null, unique
first_name string not null
last_name string
hashedPassword string not null

Images

Column name Data Type Details
id int PK, not null
user_id int not null
url string not null
title string
description string
  • user_id references Users table

Labels

Column name Data Type Details
id int PK, not null
name string not null, unique

Stash

Column name Data Type Details
id int PK, not null
user_id int not null
name string not null
description string
  • user_id references Users table

Favorites

Column name Data Type Details
id int PK, not null
image_id int not null
user_id int not null
  • user_id references Users table
  • image_id references Images table

Comments

Column name Data Type Details
id int PK, not null
user_id int not null
image_id int not null
comment string not null
  • user_id references Users table
  • image_id references Images table

StashImages

Column name Data Type Details
id int PK, not null
image_id int not null
stash_id int not null
  • stash_id references Stash table
  • image_id references Images table

LabelImages

Column name Data Type Details
id int PK, not null
image_id int not null
label_id int not null
  • label_id references Labels table
  • image_id references Images table

Clone this wiki locally