From 76997e7d2bd81bf892040ddba0b5aa85f8497afd Mon Sep 17 00:00:00 2001 From: Jann Stute Date: Sat, 8 Aug 2026 22:02:41 +0200 Subject: [PATCH] fix: add missing field templates tables --- .../core/library/alchemy/migrations.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/tagstudio/core/library/alchemy/migrations.py b/src/tagstudio/core/library/alchemy/migrations.py index 94ec895c..ca539b32 100644 --- a/src/tagstudio/core/library/alchemy/migrations.py +++ b/src/tagstudio/core/library/alchemy/migrations.py @@ -419,6 +419,26 @@ class MigrationTo200(DBMigration): ) session.execute(comm_stmt) + # Add field templates tables + session.execute( + text(""" + CREATE TABLE text_field_templates ( + id INTEGER NOT NULL PRIMARY KEY, + is_multiline BOOLEAN NOT NULL, + name VARCHAR NOT NULL + ) + """) + ) + session.execute( + text(""" + CREATE TABLE datetime_field_templates ( + id INTEGER NOT NULL PRIMARY KEY, + name VARCHAR NOT NULL + ) + """) + ) + session.flush() + # Add default field templates logger.info(fmt_log("Adding default field templates...")) for template in DEFAULT_FIELD_TEMPLATES: