-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
John Beck edited this page Jan 31, 2021
·
4 revisions
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | Pk, not null |
username |
varchar | not null, unique |
email |
varchar | not null, unique |
hashedPassword |
varchar | not Null |
-
idhasManyusers.id throughfollowers - Sequelize
belongsToManyusersthroughfollowersasfollowerIdassociation
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
author |
varchar | not null |
title |
varchar | not null |
date |
date | not null |
preview |
text | not null |
story |
text | not null |
storyLikes |
Integer | not null |
imgLink |
varchar | allow null |
- Sequelize
hasManyCommentsassociation - Sequelize
belongsToManyUsersthroughuserLikedStoriesasstoryIdassociation - Sequelize
belongsToManyCategoriesthroughstoryCategoriesasstoryIdassociation
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
comment |
text | not null |
commentLikes |
integer | not null |
userId |
integer | not null |
storyId |
integer | not null |
- Sequelize
hasManyUsersassociation - Sequelize
hasManyStoriesassociation
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
name |
varchar | not null |
Sequelize belongsToMany Stories through storyCategories as categoryId association
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
userId |
Integer | not Null |
storyId |
Integer | not null |