Database Schema - Ashley-B1/Rabbit-Hole Wiki

Users

Column Name Data Type Details
id integer PK
userName string(50) NOT null, unique
firstName string(50)
lastName string(50)
email string(255) NOT null, unique
password string NOT null
createdAt timestamp
updatedAt timestamp

Posts

Column Name Data Type Details
id integer PK
userId integer FK, NOT null
title string(255) NOT null
content text NOT null
createdAt timestamp
updatedAt timestamp

Comments

Column Name Data Type Details
id integer PK
userId integer FK, NOT null
postId integer FK, NOT null
content text NOT null
createdAt timestamp
updatedAt timestamp

PostLikes

Column Name Data Type Details
id integer PK
userId integer FK, NOT null
postId integer FK, NOT null
createdAt timestamp
updatedAt timestamp

Follows

Column Name Data Type Details
id integer PK
userId integer FK, NOT null
followerId integer FK, NOT null
createdAt timestamp
updatedAt timestamp