Update schema and seed with new fields

pull/1/head
sigonasr2 3 years ago
parent 441e656c45
commit 6f5f3f801c
  1. 3
      ngsplanner_schema.sql
  2. 25
      ngsplanner_seed.sql
  3. 4
      server.js

@ -64,7 +64,8 @@ CREATE TABLE "weapon" (
CREATE TABLE "weapon_type" (
"id" SERIAL UNIQUE PRIMARY KEY,
"name" text,
"icon" text
"icon" text,
"dmg_type" int
);
CREATE TABLE "potential" (

@ -35,19 +35,18 @@ insert into class(name,icon) values('Gunner','/icons/UINGSClassGu.png');
insert into class(name,icon) values('Force','/icons/UINGSClassFo.png');
insert into class(name,icon) values('Techter','/icons/UINGSClassTe.png');
insert into weapon_type(name,icon) values('Sword','/icons/NGSUIItemSwordMini.png');
insert into weapon_type(name,icon) values('Spear','/icons/NGSUIItemPartizanMini.png');
insert into weapon_type(name,icon) values('Wired Lance','/icons/NGSUIItemWiredLanceMini.png');
insert into weapon_type(name,icon) values('Twin Dagger','/icons/NGSUIItemTwinDaggersMini.png');
insert into weapon_type(name,icon) values('Double Saber','/icons/NGSUIItemDoubleSaberMini.png');
insert into weapon_type(name,icon) values('Knuckles','/icons/NGSUIItemKnuckleMini.png');
insert into weapon_type(name,icon) values('Assault Rifle','/icons/NGSUIItemAssaultRifleMini.png');
insert into weapon_type(name,icon) values('Launcher','/icons/NGSUIItemLauncherMini.png');
insert into weapon_type(name,icon) values('Twin Machine Guns','NGSUIItemTwinMachinegunsMini.png');
insert into weapon_type(name,icon) values('Rod','/icons/NGSUIItemRodMini.png');
insert into weapon_type(name,icon) values('Talis','/icons/NGSUIItemTalisMini.png');
insert into weapon_type(name,icon) values('Wand','/icons/NGSUIItemWandMini.png');
insert into weapon_type(name,icon) values('Legacy','');
insert into weapon_type(name,icon,dmg_type) values('Sword','/icons/NGSUIItemSwordMini.png',0);
insert into weapon_type(name,icon,dmg_type) values('Spear','/icons/NGSUIItemPartizanMini.png',0);
insert into weapon_type(name,icon,dmg_type) values('Wired Lance','/icons/NGSUIItemWiredLanceMini.png',0);
insert into weapon_type(name,icon,dmg_type) values('Twin Dagger','/icons/NGSUIItemTwinDaggersMini.png',0);
insert into weapon_type(name,icon,dmg_type) values('Double Saber','/icons/NGSUIItemDoubleSaberMini.png',0);
insert into weapon_type(name,icon,dmg_type) values('Knuckles','/icons/NGSUIItemKnuckleMini.png',0);
insert into weapon_type(name,icon,dmg_type) values('Assault Rifle','/icons/NGSUIItemAssaultRifleMini.png',1);
insert into weapon_type(name,icon,dmg_type) values('Launcher','/icons/NGSUIItemLauncherMini.png',1);
insert into weapon_type(name,icon,dmg_type) values('Twin Machine Guns','NGSUIItemTwinMachinegunsMini.png',1);
insert into weapon_type(name,icon,dmg_type) values('Rod','/icons/NGSUIItemRodMini.png',2);
insert into weapon_type(name,icon,dmg_type) values('Talis','/icons/NGSUIItemTalisMini.png',2);
insert into weapon_type(name,icon,dmg_type) values('Wand','/icons/NGSUIItemWandMini.png',2);
insert into potential(name,icon) values('Recycler Unit','/icons/NGSUIItemPotentialAbility.png');
insert into potential(name,icon) values('Indomitable Unit','/icons/NGSUIItemPotentialAbility.png');

@ -78,7 +78,7 @@ const ENDPOINTDATA=[
},
{
endpoint:"weapon_type",
requiredfields:["name"],
requiredfields:["name","dmg_type"],
optionalfields:["icon"],
excludedfields:[] //Fields to not output in GET.
},
@ -126,7 +126,7 @@ const ENDPOINTDATA=[
},
{
endpoint:"augment",
requiredfields:["augment_type_id","level"],
requiredfields:["augment_type_id","name"],
optionalfields:["variance","hp","pp","mel_dmg","rng_dmg","tec_dmg","crit_rate","crit_dmg","pp_cost_reduction","active_pp_recovery","natural_pp_recovery","dmg_res","affix_success_rate","all_down_res","burn_res","freeze_res","blind_res","shock_res","panic_res","poison_res","battle_power_value","pb_gauge_build","popularity","editors_choice"],
excludedfields:[] //Fields to not output in GET.
},

Loading…
Cancel
Save