diff --git a/src/models.py b/src/models.py index 0c92a8f..28cf865 100644 --- a/src/models.py +++ b/src/models.py @@ -38,6 +38,6 @@ class Device(db.Model): class Sensor(db.Model): __tablename__ = 'sensor' - id = db.Column(db.UUID, primary_key=True) + id = db.Column(UUID(as_uuid=True), primary_key=True) status = db.Column(db.Enum(SensorStatusEnum), nullable=False) - device_id = db.Column(db.UUID, db.ForeignKey('device.id')) + device_id = db.Column(UUID(as_uuid=True), db.ForeignKey('device.id'))