From 947ba824c0e1868ff62b397a02a107c122cf01e9 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 23:37:43 +0000 Subject: [PATCH] fix(web-client): restore is_reusable column in sqlite seeding - Fixes a regression where the browser database failed to populate due to missing `is_reusable` column in the `INSERT` statement for `resource_definitions`. - The column is required by the schema (`NOT NULL`) and was erroneously removed in a previous commit. - Updates `SqliteService.seedDefinitionCatalogs` to include `is_reusable` and bind it correctly. --- praxis/web-client/src/app/core/services/sqlite.service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/praxis/web-client/src/app/core/services/sqlite.service.ts b/praxis/web-client/src/app/core/services/sqlite.service.ts index b0c27d32..13c8e913 100644 --- a/praxis/web-client/src/app/core/services/sqlite.service.ts +++ b/praxis/web-client/src/app/core/services/sqlite.service.ts @@ -439,11 +439,10 @@ export class SqliteService { db.exec('BEGIN TRANSACTION'); // Seed Resources - // FIXED: Removed is_reusable to align with schema.sql const insertResDef = db.prepare(` INSERT OR IGNORE INTO resource_definitions - (accession_id, name, fqn, resource_type, vendor, description, properties_json, is_consumable, num_items, plr_category) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + (accession_id, name, fqn, resource_type, vendor, description, properties_json, is_consumable, is_reusable, num_items, plr_category) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) `); for (const def of PLR_RESOURCE_DEFINITIONS) { @@ -456,7 +455,7 @@ export class SqliteService { def.description || null, JSON.stringify(def.properties_json), def.is_consumable ? 1 : 0, - // def.is_reusable, <-- DROPPED per schema.sql + def.is_reusable ? 1 : 0, def.num_items || null, def.plr_category // maps to plr_category ]);