mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-06 20:08:40 +00:00
Implement SQL for users, implement retrieving user from database
This commit is contained in:
parent
f179e0df8d
commit
8a3393b0fb
8 changed files with 67 additions and 10 deletions
30
DatabaseMigrations/0.sql
Normal file
30
DatabaseMigrations/0.sql
Normal file
|
@ -0,0 +1,30 @@
|
|||
create table Users
|
||||
(
|
||||
UserId int auto_increment,
|
||||
Username tinytext not null,
|
||||
IconHash text null,
|
||||
Game int default 0 not null,
|
||||
Lists int default 0 not null,
|
||||
HeartCount int default 0 not null,
|
||||
YayHash text null,
|
||||
BooHash text null,
|
||||
Biography text null,
|
||||
ReviewCount int default 0 not null,
|
||||
CommentCount int default 0 not null,
|
||||
PhotosByMeCount int default 0 not null,
|
||||
PhotosWithMeCount int default 0 not null,
|
||||
CommentsEnabled tinyint(1) default 1 not null,
|
||||
FavouriteSlotCount int default 0 not null,
|
||||
FavouriteUserCount int default 0 not null,
|
||||
lolcatftwCount int default 0 not null,
|
||||
Pins text not null,
|
||||
StaffChallengeGoldCount int default 0 not null,
|
||||
StaffChallengeSilverCount int default 0 not null,
|
||||
StaffChallengeBronzeCount int default 0 not null,
|
||||
UsedSlots int default 0 not null,
|
||||
constraint users_user_id_uindex
|
||||
unique (UserId)
|
||||
);
|
||||
|
||||
alter table Users
|
||||
add primary key (UserId);
|
Loading…
Add table
Add a link
Reference in a new issue