This commit is contained in:
Colin Goutte 2021-09-29 11:04:44 +02:00
parent a14ad8f5f7
commit b5710b3dfb
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@ from collections import defaultdict
from . import utils
from papi.sqlapp.database import Base, SessionLocal, engine
from papi.sqlapp import crud
app = FastAPI()

View File

@ -13,7 +13,7 @@ class Sonde(Base):
class Mesure(Base):
__tablename__ == "mesure"
__tablename__ = "mesure"
mesure_id = Column(Integer, primary_key=True, index=True)
sonde_id = Column(Integer, Foreignkey("sonde.id"))
sonde_id = Column(Integer, ForeignKey("sonde.sonde_id"))
content = Column(JSON, nullable=False)