Skip to content

Commit

Permalink
pinecone table name fix and import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
henri123lemoine committed Jul 30, 2023
1 parent ab220a1 commit 5bd4386
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions align_data/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions migrations/versions/ef06ffe4a632_added_pinecone_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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 ###

0 comments on commit 5bd4386

Please sign in to comment.