Skip to content

Commit

Permalink
fix(app): add create tables on create_app for now, cli version isn't …
Browse files Browse the repository at this point in the history
…working
  • Loading branch information
scragg0x committed Sep 25, 2016
1 parent b9ef745 commit d6112dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions realms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ def root():

app.discover()

# This will be removed at some point
with app.app_context():
if app.config.get('DB_URI'):
db.metadata.create_all(db.get_engine(app))

return app

# Init plugins here if possible
Expand Down

0 comments on commit d6112dc

Please sign in to comment.