-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Guilherme Pace edited this page Jan 25, 2021
·
9 revisions
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| username | varchar(30) | not null, indexed, unique |
| varchar(50) | not null, indexed, unique | |
| firstName | varchar(50) | not null |
| lastName | varchar(50) | not null |
| websiteUrl | varchar(100) | |
| avatarUrl | varchar(100) | |
| hashedPassword | string | not null |
| createdAt | datetime | not null |
| updatedAt | datetime | not null |
- Sequelize hasMany Tracks association
- Sequelize hasMany Comments association
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| title | varchar(30) | not null, indexed |
| description | string | not null |
| imageUrl | varchar(100) | |
| userId | integer | not null |
| genreId | integer | not null |
| createdAt | datetime | not null |
| updatedAt | datetime | not null |
- Sequelize belongsTo Users association
- Sequelize belongsTo Genres association
- Sequelize hasMany Comments association
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| name | varchar(50) | not null, unique |
| createdAt | datetime | not null |
| updatedAt | datetime | not null |
- Sequelize hasMany Tracks association
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| content | string | not null |
| userId | integer | not null |
| trackId | integer | not null |
| createdAt | datetime | not null |
| updatedAt | datetime | not null |
- Sequelize belongsTo Users association
- Sequelize belongsTo Tracks association
- Playlists
- User_Playlist (join table)
- Likes
- Follows