From e790db7bb7145ef22d26f267d82061d4dd9cc92a Mon Sep 17 00:00:00 2001 From: mpabi Date: Thu, 20 Jun 2024 19:55:30 +0000 Subject: [PATCH] Model need to be fixed --- app/models.py | 8 ++++---- entrypoint.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models.py b/app/models.py index fe7d738..b847657 100644 --- a/app/models.py +++ b/app/models.py @@ -7,8 +7,8 @@ class Sequence(Base): __tablename__ = "sequences" id = Column(Integer, primary_key=True, index=True) - name = Column(String, index=True) - description = Column(String) + name = Column(String(255), index=True) + description = Column(String(255)) sequence = Column(Text) features = relationship("Feature", back_populates="sequence") @@ -17,8 +17,8 @@ class Feature(Base): __tablename__ = "features" id = Column(Integer, primary_key=True, index=True) - type = Column(String, index=True) - location = Column(String) + type = Column(String(255), index=True) + location = Column(String(255)) sequence = Column(Text) qualifiers = Column(Text) diff --git a/entrypoint.py b/entrypoint.py index 262e34d..f76d8a4 100644 --- a/entrypoint.py +++ b/entrypoint.py @@ -1,3 +1,4 @@ +#%% # entrypoint.py from Bio import SeqIO from sqlalchemy.orm import Session @@ -8,6 +9,7 @@ import json # Tworzenie tabeli w bazie danych Base.metadata.create_all(bind=engine) +#%% def get_db(): db = SessionLocal() try: