mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-04 04:40:40 +04:00
Code refactoring. Add support genres and actors to routes
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
from asyncio import run as aiorun
|
||||
import typer
|
||||
|
||||
import database
|
||||
from database import Database
|
||||
|
||||
cli = typer.Typer()
|
||||
|
||||
|
||||
@cli.command(name="create")
|
||||
def create_database(): aiorun(database.create_all())
|
||||
def create_database(): aiorun(Database.create_all())
|
||||
@cli.command(name="drop")
|
||||
def drop_database(): aiorun(database.drop_all())
|
||||
def drop_database(): aiorun(Database.drop_all())
|
||||
@cli.command(name="recreate")
|
||||
def recreate_database(): aiorun(database.recreate_all())
|
||||
def recreate_database(): aiorun(Database.recreate_all())
|
||||
|
||||
Reference in New Issue
Block a user