Checklist
TagStudio Version
Alpha 9.5.7 (main branch)
Operating System & Version
macOS 15
Description
If a library was migrated from a DB version earlier than 200, then fields can not be added to entries due to a NOT NULL constraint on the legacy type_key column that was left in due to it being difficult to remove because of a FOREIGN KEY constraint. Caused by #1354.
Removing the now-unused type_key column entirely as described here should resolve this issue as well.
Expected Behavior
Fields should be able to be added to entries in all libraries, regardless of the version they were created in.
Steps to Reproduce
- Have a library that was created before DB version 200 (9.5.7 will do, not on the main branch)
- Try adding a field to a file entry
- Observe that you can not
Logs
2026-05-12 23:06:56 [error ] (sqlite3.IntegrityError) NOT NULL constraint failed: text_fields.type_key
[SQL: INSERT INTO text_fields (value, is_multiline, name, entry_id) VALUES (?, ?, ?, ?)]
[parameters: (None, 0, 'Title', 230)]
(Background on this error at: https://sqlalche.me/e/20/gkpj)
Checklist
TagStudio Version
Alpha 9.5.7 (main branch)
Operating System & Version
macOS 15
Description
If a library was migrated from a DB version earlier than 200, then fields can not be added to entries due to a
NOT NULLconstraint on the legacytype_keycolumn that was left in due to it being difficult to remove because of aFOREIGN KEYconstraint. Caused by #1354.Removing the now-unused
type_keycolumn entirely as described here should resolve this issue as well.Expected Behavior
Fields should be able to be added to entries in all libraries, regardless of the version they were created in.
Steps to Reproduce
Logs