from flask.cli import with_appcontext from click import command from ..dependencies import db @command('clear_db') @with_appcontext def clear_db() -> None: """Clear database""" db.drop_all() db.create_all()