Schema - Msheezi/cuddlr GitHub Wiki

Schema

users

COLUMN DATA TYPE DETAILS
id integer not null, primary key
username string not null, indexed foreign key
email string not null indexed
password_digest string not null
dob date not null
location string not null
profilePic string not null
headline string not null
description string not null
gender string not null
targetGender string not null
cuddleStyle datetime not null
cuddlePosition datetime not null

messages

COLUMN DATA TYPE DETAILS
id integer not null, primary key
conversationID string not null, foreign key
senderId string not null
content string not null
timeSent integer not null

conversations

COLUMN DATA TYPE DETAILS
id integer not null, primary key
participants Array not null
created Date not null

likes

COLUMN DATA TYPE DETAILS
id integer not null, primary key
username string not null
likedUser string not null, foreign key

userPictures

COLUMN DATA TYPE DETAILS
id integer not null, primary key
userId string not null, foreign key
pictureUrl string not null
profilePrimary Boolean, default: false not null