diff options
Diffstat (limited to 'ebus')
-rw-r--r-- | ebus/model/sql.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ebus/model/sql.py b/ebus/model/sql.py index 219cfbc..75ebd0c 100644 --- a/ebus/model/sql.py +++ b/ebus/model/sql.py @@ -27,7 +27,7 @@ class Value(ModelBase): id = Column(Integer, primary_key=True) timestamp = Column(DateTime,index=True) - sensor_id = Column(Integer, ForeignKey("sensor.id")) + sensor_id = Column(Integer,ForeignKey("sensor.id"),index=True) sensor = relationship(Sensor, backref=backref('values', order_by=timestamp)) discriminator = Column('type', String(50)) |