Continue Flask migration.

This commit is contained in:
yohan 2024-06-02 16:06:47 +02:00
parent 7a335d2e4c
commit ac35a37788

View File

@ -171,7 +171,7 @@ ns_thermostat = api.namespace('thermostat/', description='Thermostat API')
# only modes that are set manually will be recorded in the database
class Set_mode(db.Model):
__tablename__ = "set_mode"
name = db.Column(db.String, primary_key=True, server_default='mode', nullable=False)
name = db.Column(db.String, primary_key=True, default='mode', server_default='mode', nullable=False)
value = db.Column(db.String, nullable=False)
timestamp = db.Column(db.DateTime, server_default=db.text("CURRENT_TIMESTAMP"), nullable=False)