from databases import Database
from sqlalchemy import create_engine, MetaData
from sqlalchemy.orm import declarative_base

from ..config import settings

# for Alembic migrations and sync operations
engine = create_engine(settings.database_url)
# to use with async requests
database = Database(settings.database_url)

metadata = MetaData()
Base = declarative_base(metadata=metadata)

