feat(inventory-go): store od_rating at ingest + schema column
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
9b2f28d942
commit
e07a9459cd
2 changed files with 5 additions and 0 deletions
|
|
@ -136,6 +136,10 @@ func (s *Server) processItem(raw map[string]any) map[string]any {
|
||||||
"remaining_lifespan": nilNeg(ivI(iv, "268", -1)),
|
"remaining_lifespan": nilNeg(ivI(iv, "268", -1)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if od, ok := computeOD(raw); ok {
|
||||||
|
items["od_rating"] = od
|
||||||
|
}
|
||||||
|
|
||||||
// combat (sentinel defaults), then base values merged.
|
// combat (sentinel defaults), then base values merged.
|
||||||
wt := ivI(iv, "218103835", -1)
|
wt := ivI(iv, "218103835", -1)
|
||||||
if wt > 100 {
|
if wt > 100 {
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ func initSchema(ctx context.Context, pool *pgxpool.Pool, log *slog.Logger) {
|
||||||
rare_id INTEGER,
|
rare_id INTEGER,
|
||||||
lifespan INTEGER,
|
lifespan INTEGER,
|
||||||
remaining_lifespan INTEGER,
|
remaining_lifespan INTEGER,
|
||||||
|
od_rating DOUBLE PRECISION,
|
||||||
has_id_data BOOLEAN DEFAULT false,
|
has_id_data BOOLEAN DEFAULT false,
|
||||||
last_id_time BIGINT DEFAULT 0,
|
last_id_time BIGINT DEFAULT 0,
|
||||||
CONSTRAINT uq_char_item UNIQUE (character_name, item_id)
|
CONSTRAINT uq_char_item UNIQUE (character_name, item_id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue