Model need to be fixed
This commit is contained in:
parent
40cc16cb4f
commit
e790db7bb7
|
@ -7,8 +7,8 @@ class Sequence(Base):
|
||||||
__tablename__ = "sequences"
|
__tablename__ = "sequences"
|
||||||
|
|
||||||
id = Column(Integer, primary_key=True, index=True)
|
id = Column(Integer, primary_key=True, index=True)
|
||||||
name = Column(String, index=True)
|
name = Column(String(255), index=True)
|
||||||
description = Column(String)
|
description = Column(String(255))
|
||||||
sequence = Column(Text)
|
sequence = Column(Text)
|
||||||
|
|
||||||
features = relationship("Feature", back_populates="sequence")
|
features = relationship("Feature", back_populates="sequence")
|
||||||
|
@ -17,8 +17,8 @@ class Feature(Base):
|
||||||
__tablename__ = "features"
|
__tablename__ = "features"
|
||||||
|
|
||||||
id = Column(Integer, primary_key=True, index=True)
|
id = Column(Integer, primary_key=True, index=True)
|
||||||
type = Column(String, index=True)
|
type = Column(String(255), index=True)
|
||||||
location = Column(String)
|
location = Column(String(255))
|
||||||
sequence = Column(Text)
|
sequence = Column(Text)
|
||||||
qualifiers = Column(Text)
|
qualifiers = Column(Text)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#%%
|
||||||
# entrypoint.py
|
# entrypoint.py
|
||||||
from Bio import SeqIO
|
from Bio import SeqIO
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
@ -8,6 +9,7 @@ import json
|
||||||
# Tworzenie tabeli w bazie danych
|
# Tworzenie tabeli w bazie danych
|
||||||
Base.metadata.create_all(bind=engine)
|
Base.metadata.create_all(bind=engine)
|
||||||
|
|
||||||
|
#%%
|
||||||
def get_db():
|
def get_db():
|
||||||
db = SessionLocal()
|
db = SessionLocal()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue