diff options
author | Random Hacker <random_hacker@xapek.org> | 2010-08-28 17:32:22 +0200 |
---|---|---|
committer | Random Hacker <random_hacker@xapek.org> | 2010-08-28 17:32:22 +0200 |
commit | 6f1f8995bca7c1fda6f523a064e5a3b8d467a340 (patch) | |
tree | e9ffb675f71b5cf83bca9ba7a7c468e1809a7488 | |
parent | 41f11ac148ecce2d342514c275691fec76547f6b (diff) | |
download | ebus-alt-6f1f8995bca7c1fda6f523a064e5a3b8d467a340.tar.gz ebus-alt-6f1f8995bca7c1fda6f523a064e5a3b8d467a340.zip |
index on value(sensor_id)
-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)) |