Skip to content

Commit

Permalink
Add init-db cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
keanemind committed Jul 19, 2018
1 parent c7cd275 commit 843e6bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lostnphoned/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
pass

import lostnphoned.sms

from . import sql
sql.init_app(app)
4 changes: 4 additions & 0 deletions lostnphoned/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
from flask.cli import with_appcontext


def init_app(app):
app.cli.add_command(init_db_command)


@click.command('init-db')
@with_appcontext
def init_db_command():
Expand Down

0 comments on commit 843e6bd

Please sign in to comment.