fix(db): correct default values for jsonb and array columns
Some checks failed
CI / build-and-test (push) Failing after -31m23s

* Update default values for metadata and messages columns in thoughts and chat_histories tables
* Change tags column type to text[] with default in learnings, plans, agent_skills, and agent_guardrails tables
* Adjust index creation for tags columns in learnings and plans tables
This commit is contained in:
2026-05-03 16:24:16 +02:00
parent 91239bcf4b
commit bae63cb5cf
9 changed files with 393 additions and 265 deletions

View File

@@ -11,8 +11,8 @@ type ModelPublicEmbeddings struct {
bun.BaseModel `bun:"table:public.embeddings,alias:embeddings"`
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),nullzero," json:"created_at"`
Dim resolvespec_common.SqlInt32 `bun:"dim,type:int,notnull," json:"dim"`
Embedding resolvespec_common.SqlString `bun:"embedding,type:vector,notnull," json:"embedding"`
Dim int32 `bun:"dim,type:int,notnull," json:"dim"`
Embedding resolvespec_common.SqlVector `bun:"embedding,type:vector,notnull," json:"embedding"`
GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"`
Model resolvespec_common.SqlString `bun:"model,type:text,notnull,unique:uidx_embeddings_thought_id_model," json:"model"`
ThoughtID int64 `bun:"thought_id,type:bigint,notnull,unique:uidx_embeddings_thought_id_model," json:"thought_id"`