#!/usr/bin/env python3
"""
Migration script to add pvp_combats table
"""
import asyncio
import sys
import os

# Add parent directory to path
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))

from api.database import engine, metadata, pvp_combats

async def migrate():
    """Create pvp_combats table"""
    async with engine.begin() as conn:
        print("Creating pvp_combats table...")
        await conn.run_sync(pvp_combats.create, checkfirst=True)
        print("✅ pvp_combats table created successfully!")

if __name__ == "__main__":
    print("=== PvP Combat Table Migration ===")
    asyncio.run(migrate())
    print("Migration complete!")
