summaryrefslogtreecommitdiff
path: root/ebus/model
diff options
context:
space:
mode:
authorRandom Hacker <random_hacker@xapek.org>2010-08-28 17:32:22 +0200
committerRandom Hacker <random_hacker@xapek.org>2010-08-28 17:32:22 +0200
commit6f1f8995bca7c1fda6f523a064e5a3b8d467a340 (patch)
treee9ffb675f71b5cf83bca9ba7a7c468e1809a7488 /ebus/model
parent41f11ac148ecce2d342514c275691fec76547f6b (diff)
downloadebus-alt-6f1f8995bca7c1fda6f523a064e5a3b8d467a340.tar.gz
ebus-alt-6f1f8995bca7c1fda6f523a064e5a3b8d467a340.zip
index on value(sensor_id)
Diffstat (limited to 'ebus/model')
-rw-r--r--ebus/model/sql.py2
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))