-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Walter Hills edited this page Feb 20, 2021
·
16 revisions
Schema for PostgreSQL using Sequelize ORM
| column name | data type | details |
|---|---|---|
id |
varchar(36) | not null, indexed, primary key |
first_name |
varchar(20) | not null |
last_name |
varchar(20) | not null |
email |
varchar(255) | not null, unique |
hashedPassword |
binary | not null |
bio |
text | not null |
username |
varchar(20) | not null, unique |
| createdAt | datetime | not null |
| updatedAt | datetime | not null |
- Sequelize
hasManycommentsassociation - Sequelize
hasManyvideosassociation
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
body |
text | not null |
userId |
integer | not null |
videoId |
integer | not null |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
- Sequelize
belongsTousersassociation - Sequelize
belongsTovideosassociation
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
title |
varchar(30) | not null |
description |
text | not null |
link |
varchar(50) | unique, not null |
languageId |
integer | not null |
userId |
integer | not null |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
- Sequelize
hasManycommentsassociation - Sequelize
belongsTousersassociation - Sequelize
belongsTolanguagesassociation
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
varchar(20) | unique, not null |
- Sequelize
hasManyvideosassociation
An app created by: Walter Hills, Alpesh Vyas, and Yassine Cherradi