-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
John Beck edited this page Feb 2, 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 |
- Sequelize
belongsToCommentsassociation - Sequelize
belongsToManyusersthroughfollowersasfollowerIdassociation - Sequelize
belongsToManyStoriesthroughuserLikedStoriesasuserIdassociation
| 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
belongsToCommentsassociation - 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
belongsToManyStoriesthroughstoryCategoriesascategoryIdassociation
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
userId |
Integer | not Null |
storyId |
Integer | not null |
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
categoryId |
Integer | not Null |
storyId |
Integer | not null |
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
userId |
Integer | not Null |
followerId |
Integer | not null |
| Column Name | Data Type | Details |
|---|---|---|
id |
Integer | pk, not null |
userId |
Integer | not Null |
commentId |
Integer | not null |