Open raj454raj opened 8 years ago
New proposed schema:
auth_user |
---|
first_name |
last_name |
password |
institute |
_referrer(ref authuser) |
_codechefhandle(ref handle) |
_codeforceshandle(ref handle) |
_spojhandle(ref handle) |
_hackerearthhandle(ref handle) |
_hackerrankhandle(ref handle) |
handle |
---|
name |
site |
problem |
---|
name |
link |
tags |
site |
submission |
---|
stopstalk_handle |
_submissionhandle(ref handle) |
time_stamp |
problem(ref problem) |
lang |
status |
points |
view_link |
custom_friend |
---|
_user_id(ref authuser) |
first_name |
last_name |
institute |
_duplicate_cu(ref customfriend) |
_referrer(ref authuser) |
_codechefhandle(ref handle) |
_codeforceshandle(ref handle) |
_spojhandle(ref handle) |
_hackerearthhandle(ref handle) |
_hackerrankhandle(ref handle) |
trending_problem |
---|
_problemid (ref problem) |
_submissioncount |
_usercount |
Instead of storing the handles and sites in the auth_user table have a table having site handles and site names and then make id of this table as the foreign key for auth_user table.
Also make a problem table(extend current problem_tags table) and just include problem_id in a submission.