From 7383ffea642647d2c55bdd0c7cd57488bbb25a7e Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Tue, 19 Sep 2023 14:44:45 +0200 Subject: [PATCH] Revert "Model for annotation metadata" This reverts commit b067cfe6beb54e0dcedc5920e871222f1cba4cad. --- h/models/__init__.py | 1 - h/models/annotation_metadata.py | 25 ------------------------- 2 files changed, 26 deletions(-) delete mode 100644 h/models/annotation_metadata.py diff --git a/h/models/__init__.py b/h/models/__init__.py index c07fdaa9fdc..dbb0ec0c221 100644 --- a/h/models/__init__.py +++ b/h/models/__init__.py @@ -18,7 +18,6 @@ """ from h.models.activation import Activation from h.models.annotation import Annotation -from h.models.annotation_metadata import AnnotationMetadata from h.models.annotation_moderation import AnnotationModeration from h.models.auth_client import AuthClient from h.models.auth_ticket import AuthTicket diff --git a/h/models/annotation_metadata.py b/h/models/annotation_metadata.py deleted file mode 100644 index d5388155684..00000000000 --- a/h/models/annotation_metadata.py +++ /dev/null @@ -1,25 +0,0 @@ -import sqlalchemy as sa -from sqlalchemy.dialects import postgresql as pg -from sqlalchemy.ext.mutable import MutableDict - -from h.db import Base - - -class AnnotationMetadata(Base): - __tablename__ = "annotation_metadata" - - id = sa.Column(sa.Integer, autoincrement=True, primary_key=True) - - annotation_pk = sa.Column( - sa.Integer, - sa.ForeignKey("annotation.pk", ondelete="cascade"), - nullable=False, - unique=True, - ) - - data = sa.Column( - MutableDict.as_mutable(pg.JSONB), - default=dict, - server_default=sa.func.jsonb("{}"), - nullable=True, - )