import asyncio from piccolo.table import create_db_tables from .users import User from .media import Media async def create_tables(): """ Initializes the database """ await create_db_tables(User, Media, if_not_exists=True) await User.create_index([User.public_id], if_not_exists=True) await User.create_index([User.username], if_not_exists=True)