Important Fixes, New mechanics, and many more
Some checks failed
CI / validate (push) Failing after 9m21s

This commit is contained in:
2026-08-15 17:37:57 +05:00
parent 1774496cf9
commit 438e5af0ad
56 changed files with 5090 additions and 119 deletions

View File

@@ -38,7 +38,10 @@ create table public.world_entities (
summary text not null,
tags text[] not null default '{}',
secrets jsonb not null default '[]' check (jsonb_typeof(secrets) = 'array'),
search_document tsvector generated always as (to_tsvector('english', coalesce(name, '') || ' ' || coalesce(summary, '') || ' ' || array_to_string(tags, ' '))) stored,
-- Generated expressions may only call IMMUTABLE functions. PostgreSQL marks
-- array_to_string as STABLE, so tags stay queryable through their text[]
-- column while the FTS document indexes the entity's searchable prose.
search_document tsvector generated always as (to_tsvector('english'::regconfig, coalesce(name, '') || ' ' || coalesce(summary, ''))) stored,
created_at timestamptz not null default now()
);
create index world_entities_search_idx on public.world_entities using gin(search_document);
@@ -175,7 +178,7 @@ create table public.memories (
importance integer not null check (importance between 1 and 5),
tags text[] not null default '{}',
entity_ids uuid[] not null default '{}',
search_document tsvector generated always as (to_tsvector('english', coalesce(summary, '') || ' ' || array_to_string(tags, ' '))) stored,
search_document tsvector generated always as (to_tsvector('english'::regconfig, coalesce(summary, ''))) stored,
created_at timestamptz not null default now()
);
create index memories_search_idx on public.memories using gin(search_document);