From afb0f56a7d048c28079f698b2f4bdbc5500eeac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Thu, 6 Aug 2020 20:05:01 +0200 Subject: [PATCH] all uuid-s postgres specific --- src/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'))