TormundTargers / FROST

FRee and Open Source Tube
GNU General Public License v3.0
0 stars 0 forks source link

Database design #2

Open TormundTargers opened 9 years ago

TormundTargers commented 9 years ago

The database we will need at least these tables:

For the first milestone, since we are not implementing commenting, currently we are going to create the Videos (for uploading) and Users (for moderation) tables.

Initial Designs

Videos

Column name Type Primary Key Indexed Auto Increment Allow Null Description
id integer Yes Yes Yes No Auto-incremented unique identifier of a video.
title varchar(255) No Yes No No
description varchar(1000) No No No Yes
url varchar(255) No No No No
filetype varchar(10) No No No No
uploader_ip varchar(15) No Yes No No
uploader_name varchar(30) No Yes No Yes
tripcode varchar(12) No No No Yes 10 chars for actual tripcode, extra 2 chars for ! marks.
upload_date datetime No No No No
video_status integer No No No No Approved video, unmoderated video or 'deleted forever' video.
removal_code integer No No No Yes It is null if it is not removed.
host_code integer No No No No To help locate and provide support server-side for how to retrieve the video.

Users/Moderators

Column name Type Primary Key Indexed Auto Increment Allow Null
id integer/long Yes Yes Yes No
name varchar(30) No Yes No No
email varchar(255) No No No No
password varchar(255) No No No No
mod_level integer No No No No
last_ip varchar(15) No Yes No No

Beware! This is only a first draft.

deltabeard commented 9 years ago

Regarding the rows with 'Maybe' in Allow Null:

Other changes:

Other comments: