Add rarity field in database

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

@ -3,3 +3,4 @@ CREATE TABLE "element" ("id" SERIAL UNIQUE PRIMARY KEY,"name" text);
alter table augment add column element_id int; alter table augment add column element_id int;
alter table augment add column icon text; 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, "weak_point_dmg" boolean,
"hp_recovery" boolean, "hp_recovery" boolean,
"popularity" int, "popularity" int,
"editors_choice" int "editors_choice" int,
"rarity" int
); );
CREATE TABLE "class" ( CREATE TABLE "class" (
@ -163,7 +164,8 @@ CREATE TABLE "augment" (
"pb_gauge_build" float, "pb_gauge_build" float,
"popularity" int, "popularity" int,
"editors_choice" int, "editors_choice" int,
"element_id" int "element_id" int,
"icon" text
); );
CREATE TABLE "skill" ( CREATE TABLE "skill" (
@ -209,8 +211,7 @@ CREATE TABLE "weapon_existence_data" (
CREATE TABLE "augment_type" ( CREATE TABLE "augment_type" (
"id" SERIAL UNIQUE PRIMARY KEY, "id" SERIAL UNIQUE PRIMARY KEY,
"name" text, "name" text
"icon" text
); );
CREATE TABLE "photon_art" ( 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) 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); 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) 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); 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) 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); 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('Hunter','/icons/UINGSClassHu.png');
insert into class(name,icon) values('Fighter','/icons/UINGSClassFi.png'); insert into class(name,icon) values('Fighter','/icons/UINGSClassFi.png');

@ -199,7 +199,7 @@ const ENDPOINTDATA=[
}, },
{ {
endpoint:"food", 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"], 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. excludedfields:[] //Fields to not output in GET.
}, },

Loading…
Cancel
Save