mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
16 lines
345 B
Python
16 lines
345 B
Python
|
|
from asyncio import run as aiorun
|
|
import typer
|
|
|
|
from database import Database
|
|
|
|
cli = typer.Typer()
|
|
|
|
|
|
@cli.command(name="create")
|
|
def create_database(): aiorun(Database.create_all())
|
|
@cli.command(name="drop")
|
|
def drop_database(): aiorun(Database.drop_all())
|
|
@cli.command(name="recreate")
|
|
def recreate_database(): aiorun(Database.recreate_all())
|