feat(0035a): tipo Group + columna group_id en entities
Plumbing para issue 0035 — agrupacion de resultados de enrichers cuando exceden umbral. Sin cambios visibles para el usuario todavia. - Migracion idempotente: ALTER TABLE entities ADD COLUMN group_id si no existe (detectado via PRAGMA table_info). Se ejecuta al abrir el proyecto en switch_to_project y en el bootstrap inicial. - Tipo Group en examples/types.yaml (template) y en el types.yaml del proyecto default activo en Windows. - shape=square (regla en types_registry.cpp extendida a Group), color=#94A3B8, icon=ti-stack-2. - Fields: name (req), count (int), enricher (string), batch_id (string). Refs: issues/0035a-group-type-and-schema.md
This commit is contained in:
@@ -508,6 +508,15 @@ static bool switch_to_project(const std::string& slug) {
|
||||
apply_project_paths(slug);
|
||||
ge::views_inspector_clear_draft(g_app);
|
||||
g_app.parsed_types = ge::ParsedTypes{};
|
||||
// Migracion idempotente del schema (issue 0035a y siguientes).
|
||||
{
|
||||
std::string mig_err;
|
||||
if (!ge::project_migrate_schema(g_input_path, &mig_err)) {
|
||||
std::fprintf(stderr,
|
||||
"[graph_explorer] project_migrate_schema('%s') failed: %s\n",
|
||||
g_input_path.c_str(), mig_err.c_str());
|
||||
}
|
||||
}
|
||||
if (!ge::layout_store_open(g_layout_db_path.c_str())) {
|
||||
std::fprintf(stderr, "[graph_explorer] layout_store_open failed: %s\n",
|
||||
g_layout_db_path.c_str());
|
||||
@@ -1949,6 +1958,15 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
apply_project_paths(target);
|
||||
// Migracion idempotente del schema (issue 0035a y siguientes).
|
||||
{
|
||||
std::string mig_err;
|
||||
if (!ge::project_migrate_schema(g_input_path, &mig_err)) {
|
||||
std::fprintf(stderr,
|
||||
"[graph_explorer] project_migrate_schema('%s') failed: %s\n",
|
||||
g_input_path.c_str(), mig_err.c_str());
|
||||
}
|
||||
}
|
||||
ge::layout_store_open(g_layout_db_path.c_str());
|
||||
ge::project_settings_touch(target.c_str());
|
||||
load_input();
|
||||
|
||||
Reference in New Issue
Block a user