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: