aboutsummaryrefslogtreecommitdiff
path: root/pyenc/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyenc/db.py')
-rw-r--r--pyenc/db.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/pyenc/db.py b/pyenc/db.py
deleted file mode 100644
index 38edda1..0000000
--- a/pyenc/db.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Database connection for application."""
-
-import click
-from flask import current_app, g
-from flask.cli import with_appcontext
-from .model import db
-
-
-@click.command('init-db')
-@with_appcontext
-def init_db_command():
- """Create database from command line."""
- # init_db()
- # print(db)
- print(db)
- db.create_all()
- click.echo('Initialized the database.')
-
-
-def init_app(app):
- """Add database (and click) to given flask app."""
- # app.teardown_appcontext(close_db)
- db.init_app(app)
- app.cli.add_command(init_db_command)