2022-10-27 19:53:39 +02:00
|
|
|
from click import command
|
2023-01-14 17:38:03 +01:00
|
|
|
from flask.cli import with_appcontext
|
2022-10-27 19:53:39 +02:00
|
|
|
|
|
|
|
from ..dependencies import db
|
|
|
|
|
|
|
|
|
2023-01-14 17:38:03 +01:00
|
|
|
@command("clear_db")
|
2022-10-27 19:53:39 +02:00
|
|
|
@with_appcontext
|
|
|
|
def clear_db() -> None:
|
|
|
|
"""Clear database"""
|
|
|
|
db.drop_all()
|
|
|
|
db.create_all()
|