aboutsummaryrefslogtreecommitdiff
path: root/poller
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2021-08-19 12:28:53 -0400
committerGalen Guyer <galen@galenguyer.com>2021-08-19 12:28:53 -0400
commit9dda1c9ed4e7e039ac894179b2d06c5e6c68180f (patch)
tree913af0ebf64da9c8f53f7a9336a4af5221f01306 /poller
parent3a4c566701e552a61cbc2462b4b0d69439b720e1 (diff)
add flask db migrations
Diffstat (limited to 'poller')
-rw-r--r--poller/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/poller/__init__.py b/poller/__init__.py
index ca60918..aeea1af 100644
--- a/poller/__init__.py
+++ b/poller/__init__.py
@@ -11,6 +11,7 @@ import threading
from flask import Flask
from bs4 import BeautifulSoup
from flask_sqlalchemy import SQLAlchemy
+from flask_migrate import Migrate
POOL_TIME = 5 * 60 # Seconds
@@ -34,6 +35,7 @@ logging.getLogger().setLevel(APP.config['LOG_LEVEL'])
APP.logger.info('Launching rit-covid-poller v' + APP.config['VERSION'])
db = SQLAlchemy(APP)
+migrate = Migrate(APP, db)
APP.logger.info('SQLAlchemy pointed at ' + repr(db.engine.url))
#pylint: enable=no-member
@@ -123,4 +125,4 @@ def dedup():
print('dropped ' + data[i].serialize()['last_updated'])
db.session.commit()
-get_data()
+#get_data()