Commit a0f6526f authored by Davide Depau's avatar Davide Depau

Add enum names for Postgres compatibility

parent c89fb960
......@@ -40,7 +40,7 @@ class TemperatureSample(Base):
timestamp = Column(DateTime, primary_key=True, default=datetime.now)
value = Column(Float, nullable=False)
sensor = Column(Integer, primary_key=True)
modified_by = Column(Enum('BITS', 'web'), nullable=False)
modified_by = Column(Enum('BITS', 'web', name="modified_by"), nullable=False)
def __init__(self, value, sensor, modified_by):
self.value = value
......@@ -75,10 +75,10 @@ class Status(Base):
timestamp = Column(DateTime, primary_key=True, default=datetime.now)
value = Column(
Enum(OPEN, CLOSED, AWAY),
Enum(OPEN, CLOSED, AWAY, name="sede_status"),
nullable=False
)
modified_by = Column(Enum('BITS', 'web'), nullable=False)
modified_by = Column(Enum('BITS', 'web', name="modified_by"), nullable=False)
def __init__(self, value, modified_by):
self.value = value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment