diff --git a/align_data/db/models.py b/align_data/db/models.py index e5414f0f..57bdee20 100644 --- a/align_data/db/models.py +++ b/align_data/db/models.py @@ -3,7 +3,7 @@ import hashlib from datetime import datetime from typing import List, Optional -from sqlalchemy import JSON, DateTime, ForeignKey, String, Boolean, func, Text, event +from sqlalchemy import JSON, DateTime, ForeignKey, String, Boolean, Text, Float, func, event from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship from sqlalchemy.dialects.mysql import LONGTEXT @@ -26,7 +26,7 @@ class Summary(Base): class Pinecone(Base): - __tablename__ = "pinecones" + __tablename__ = "pinecone" id: Mapped[int] = mapped_column(primary_key=True) article_id: Mapped[str] = mapped_column(ForeignKey("articles.id")) diff --git a/migrations/versions/ef06ffe4a632_added_pinecone_model.py b/migrations/versions/ef06ffe4a632_added_pinecone_model.py index 6a3ea409..ea6ab6d8 100644 --- a/migrations/versions/ef06ffe4a632_added_pinecone_model.py +++ b/migrations/versions/ef06ffe4a632_added_pinecone_model.py @@ -18,7 +18,7 @@ def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### - op.create_table('pinecones', + op.create_table('pinecone', sa.Column('id', sa.Integer(), nullable=False), sa.Column('article_id', sa.Integer(), nullable=False), sa.Column('update_required', sa.Boolean(), nullable=False), @@ -31,5 +31,5 @@ def upgrade() -> None: def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### - op.drop_table('pinecones') + op.drop_table('pinecone') # ### end Alembic commands ###