Commit f33c56bb authored by Kristian Tan's avatar Kristian Tan

Moved create_all

parent f666e3a4
......@@ -16,7 +16,6 @@ GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
db = SQLAlchemy(app)
db.create_all()
# TODO: Move this into daily_usage class file
......@@ -34,6 +33,7 @@ class DailyUsage(db.Model):
return '<DailyUsage %r>' % self.id
db.create_all()
test = DailyUsage(date="12/11/2019", hours=5)
db.session.add(test)
db.session.commit()
......
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