Add rarity field in database

master
sigonasr2 3 years ago
parent ad957f15be
commit 5cfdd6c9d6
  1. 3
      ngsplanner_patch.sql
  2. 9
      ngsplanner_schema.sql
  3. 8
      ngsplanner_seed.sql
  4. 2
      server.js

@ -2,4 +2,5 @@
CREATE TABLE "element" ("id" SERIAL UNIQUE PRIMARY KEY,"name" text);
alter table augment add column element_id int;
alter table augment add column icon text;
alter table augment_type drop column icon;
alter table augment_type drop column icon;
alter table food add column rarity int;

@ -25,7 +25,8 @@ CREATE TABLE "food" (
"weak_point_dmg" boolean,
"hp_recovery" boolean,
"popularity" int,
"editors_choice" int
"editors_choice" int,
"rarity" int
);
CREATE TABLE "class" (
@ -163,7 +164,8 @@ CREATE TABLE "augment" (
"pb_gauge_build" float,
"popularity" int,
"editors_choice" int,
"element_id" int
"element_id" int,
"icon" text
);
CREATE TABLE "skill" (
@ -209,8 +211,7 @@ CREATE TABLE "weapon_existence_data" (
CREATE TABLE "augment_type" (
"id" SERIAL UNIQUE PRIMARY KEY,
"name" text,
"icon" text
"name" text
);
CREATE TABLE "photon_art" (

@ -30,10 +30,10 @@ insert into food_mult(amount,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,we
insert into food_mult(amount,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery)
values(1,1.05,10,1.05,1.05,1,1,1,1);
insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice)
values('Rich Aelio Meat','Meat','',true,false,false,false,true,false,false,false,0,0);
insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice)
values('Light Aelio Meat','Meat','',true,false,false,false,false,true,false,false,0,0);
insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice,rarity)
values('Rich Aelio Meat','Meat','',true,false,false,false,true,false,false,false,0,0,1);
insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice,rarity)
values('Light Aelio Meat','Meat','',true,false,false,false,false,true,false,false,0,0,2);
insert into class(name,icon) values('Hunter','/icons/UINGSClassHu.png');
insert into class(name,icon) values('Fighter','/icons/UINGSClassFi.png');

@ -199,7 +199,7 @@ const ENDPOINTDATA=[
},
{
endpoint:"food",
requiredfields:["name"],
requiredfields:["name","rarity"],
optionalfields:["potency","pp","dmg_res","hp","pp_consumption","pp_recovery","weak_point_dmg","hp_recovery","popularity","editors_choice"],
excludedfields:[] //Fields to not output in GET.
},

Loading…
Cancel
Save