Add recovery_hash field to users table.
This commit is contained in:
parent
f39f79013e
commit
f95022dd8b
@ -6,3 +6,4 @@ alter table weapon_existence_data add column special_name text;
|
|||||||
alter table potential drop column description;
|
alter table potential drop column description;
|
||||||
alter table potential_data add column description text;
|
alter table potential_data add column description text;
|
||||||
alter table photon_art add column icon text;
|
alter table photon_art add column icon text;
|
||||||
|
alter table users add column recovery_hash text;
|
@ -214,7 +214,8 @@ CREATE TABLE "users" (
|
|||||||
"created_on" timestamptz,
|
"created_on" timestamptz,
|
||||||
"roles_id" int,
|
"roles_id" int,
|
||||||
"avatar" text,
|
"avatar" text,
|
||||||
"editors_choice" int
|
"editors_choice" int,
|
||||||
|
"recovery_hash" text
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "roles" (
|
CREATE TABLE "roles" (
|
||||||
|
@ -158,10 +158,10 @@ insert into roles(name)
|
|||||||
insert into roles(name)
|
insert into roles(name)
|
||||||
values('Guest');
|
values('Guest');
|
||||||
|
|
||||||
insert into users(username,email,password_hash,created_on,roles_id,avatar)
|
insert into users(username,email,password_hash,created_on,roles_id,avatar,recovery_hash)
|
||||||
values('sigonasr2','sigonasr2@gmail.com','ABCDEFG','2021-07-13 04:30+00',(select id from roles where name='Administrator' limit 1),'');
|
values('sigonasr2','sigonasr2@gmail.com','ABCDEFG','2021-07-13 04:30+00',(select id from roles where name='Administrator' limit 1),'','');
|
||||||
insert into users(username,email,password_hash,created_on,roles_id,avatar)
|
insert into users(username,email,password_hash,created_on,roles_id,avatar,recovery_hash)
|
||||||
values('sigonasr3','sigonasr3@gmail.com','ABCDEF','2021-07-14 05:30+00',(select id from roles where name='Editor' limit 1),'');
|
values('sigonasr3','sigonasr3@gmail.com','ABCDEF','2021-07-14 05:30+00',(select id from roles where name='Editor' limit 1),'','');
|
||||||
|
|
||||||
insert into builds(users_id,creator,build_name,class1,class2,created_on,last_modified,likes,data,editors_choice)
|
insert into builds(users_id,creator,build_name,class1,class2,created_on,last_modified,likes,data,editors_choice)
|
||||||
values((select id from users where username='sigonasr2' limit 1),'sigonasr2','Test Build',(select id from class where name='Ranger' limit 1),(select id from class where name='Force' limit 1),'2021-07-13 04:30+00','2021-07-13 04:30+00',5,'<DATA STRING>',0);
|
values((select id from users where username='sigonasr2' limit 1),'sigonasr2','Test Build',(select id from class where name='Ranger' limit 1),(select id from class where name='Force' limit 1),'2021-07-13 04:30+00','2021-07-13 04:30+00',5,'<DATA STRING>',0);
|
||||||
|
@ -210,7 +210,7 @@ const ENDPOINTDATA=[
|
|||||||
{
|
{
|
||||||
endpoint:"users",
|
endpoint:"users",
|
||||||
requiredfields:["username","email","created_on","roles_id"],
|
requiredfields:["username","email","created_on","roles_id"],
|
||||||
optionalfields:["avatar","editors_choice"],
|
optionalfields:["avatar","editors_choice","recovery_hash"],
|
||||||
excludedfields:["password_hash"] //Fields to not output in GET.
|
excludedfields:["password_hash"] //Fields to not output in GET.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user