-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
Minu Kim edited this page Mar 25, 2022
·
22 revisions
| Column Name | Data Type | Details |
|---|---|---|
| id | INTEGER | primary key, not null |
| username | VARCHAR(30) | not null, unique |
| VARCHAR(255) | not null, unique | |
| hashedPassword | VARBINARY | not null |
| profilePictureUrl | VARCHAR(255) | |
| bio | VARCHAR(160) | |
| displayName | varchar(30) | |
| dataSpent | integer | |
| trackCount | integer | |
| createdAt | TIMESTAMP | not null |
| updatedAt | TIMESTAMP | not null |
| Column Name | Data Type | Details |
|---|---|---|
| id | INTEGER | not null, primary key |
| userId | INTEGER | not null, foreign key |
| trackUrl | VARCHAR(255) | not null, unique |
| artworkUrl | VARCHAR(255) | not null |
| title | VARCHAR(100) | not null |
| description | VARCHAR(4000) | |
| duration | INTEGER | in seconds, not null |
| fileSize | INTEGER | not null |
| commentCount | INTEGER | not null |
| playCount | INTEGER | not null |
| peakData | JSON | |
| createdAt | TIMESTAMP | not null |
| updatedAt | TIMESTMAP | not null |
-
userIdreferencesUsers
| Column Name | Data Type | Details |
|---|---|---|
| id | INTEGER | not null, primary key |
| userId | INTEGER | not null, foreign key |
| trackId | INTEGER | not null, foreign key |
| body | VARCHAR(280) | not null |
| timePosted | INTEGER | not null |
| createdAt | TIMESTAMP | not null |
| updatedAt | TIMESTAMP | not null |
-
userIdreferencesUsers -
trackIdreferencesTracks -
timePostedmarks how long into a track's duration the comment was posted. Generated randomly if not specified by user
