Implement SQL for users, implement retrieving user from database

This commit is contained in:
jvyden 2021-10-06 13:38:27 -04:00
commit 8a3393b0fb
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
8 changed files with 67 additions and 10 deletions

30
DatabaseMigrations/0.sql Normal file
View 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);