Skip to content

fix: remove legacy CHECK constraint on memories.type column - #63

Merged
MichielDean merged 1 commit into
mainfrom
fix/remove-type-check-constraint
Nov 12, 2026
Merged

MichielDean merged 1 commit into
mainfrom
fix/remove-type-check-constraint

Conversation

@MichielDean

Copy link
Copy Markdown
Owner

Summary

Live databases created by the legacy Python LLMem have a CHECK constraint on the type column that only allows the 7 legacy types. This blocks migration to the new tier types (stable/volatile/log).

Migration 011 recreates the memories table without the CHECK constraint, preserving all data, indexes, FTS5 table, and triggers.

Required before llmem migrate-types can run on the live database.

Tests

332 passing.

Live databases created by the legacy Python LLMem have a CHECK constraint
on the type column that only allows the 7 legacy types. The Go migration
001 intentionally has no CHECK constraint (type validation is in application
code), but pre-existing databases retain the old constraint, blocking
migration to new tier types (stable/volatile/log).

Migration 011 recreates the memories table without the CHECK constraint,
preserving all data, indexes, FTS5 table, and triggers.
@MichielDean MichielDean added the enhancement New feature or request label Nov 12, 2026
@MichielDean
MichielDean merged commit 3fc19c5 into main Nov 12, 2026
@MichielDean
MichielDean deleted the fix/remove-type-check-constraint branch November 12, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant