Skip to content

Commit

Permalink
Merge pull request #4 from k3ypusher/db-schema
Browse files Browse the repository at this point in the history
Add user table schema.
  • Loading branch information
ftab authored Dec 26, 2024
2 parents a746919 + 55d0acc commit 2ef85a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This project provides an interface to the MusicBox database. See #randommusic on
npm start
```

- The API will be running on `http://localhost:3000`.
- The API will be running on `http://localhost:5000`.

## Endpoints

Expand Down
12 changes: 11 additions & 1 deletion db.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
CREATE TABLE `user` (
`userId` int(11) NOT NULL AUTO_INCREMENT,
`nickname` varchar(45) NOT NULL,
`isAdminIndicator` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`userId`),
UNIQUE KEY `userId_UNIQUE` (`userId`),
UNIQUE KEY `nickname_UNIQUE` (`nickname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

CREATE TABLE `user_video` (
`uservideoId` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
Expand All @@ -23,4 +32,5 @@ CREATE TABLE `video` (
PRIMARY KEY (`videoId`),
UNIQUE KEY `videoId_UNIQUE` (`videoId`),
FULLTEXT KEY `title` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

0 comments on commit 2ef85a6

Please sign in to comment.