Skip to content
Snippets Groups Projects
Commit de1f07bd authored by Felix Chadwick-Smith's avatar Felix Chadwick-Smith
Browse files

added a migrate.py file

parent 5eae3073
No related branches found
No related tags found
1 merge request!15added a migrate.py file
File added
File added
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
db = SQLAlchemy(app)
migrate = Migrate(app, db)
...@@ -88,4 +88,8 @@ def download_assessment(filename): ...@@ -88,4 +88,8 @@ def download_assessment(filename):
abort(500) abort(500)
if __name__ == '__main__': if __name__ == '__main__':
with app.app_context():
db.create_all()
app.run(debug=True, port=int(os.environ.get('PORT', 8080))) app.run(debug=True, port=int(os.environ.get('PORT', 8080)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment