From db9cbb6f7cbea5cea25141a3e44afa02065f5074 Mon Sep 17 00:00:00 2001 From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de> Date: Mon, 9 Sep 2024 18:15:54 +0200 Subject: [PATCH] models: Fruitless UUID fix attempts I hoped this would fix SQLite. It does not. --- schilder2000/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schilder2000/models.py b/schilder2000/models.py index 0935671..2c82aa5 100644 --- a/schilder2000/models.py +++ b/schilder2000/models.py @@ -2,14 +2,14 @@ from uuid import UUID from uuid_extensions import uuid7 -from sqlalchemy import String, Text +from sqlalchemy import String, Text, Uuid from sqlalchemy.orm import Mapped, mapped_column from . import db class Schild(db.Model): - ident: Mapped[UUID] = mapped_column(primary_key=True, default=uuid7) + ident: Mapped[UUID] = mapped_column(Uuid, primary_key=True, default=uuid7) title: Mapped[str] = mapped_column(String(31)) text: Mapped[str] = mapped_column(Text) image: Mapped[str] = mapped_column(String(255), nullable=True) -- GitLab