16 lines
329 B
Python
16 lines
329 B
Python
|
#!/usr/bin/env python3
|
||
|
import click
|
||
|
|
||
|
from BDSM import app, db
|
||
|
from BDSM.models import Settings
|
||
|
|
||
|
|
||
|
@app.cli.command()
|
||
|
@click.option('--drop', is_flag=True, help='Create after drop.')
|
||
|
def initdb(drop):
|
||
|
"""Initialize the database."""
|
||
|
if drop:
|
||
|
db.drop_all()
|
||
|
db.create_all()
|
||
|
click.echo('Initialized database.')
|