@echo off
REM Windows batch script to fix collation issues

echo MySQL Collation Fix Script
echo ==========================

set /p DB_USER="MySQL Username (acbptxvs): "
if "%DB_USER%"=="" set DB_USER=acbptxvs

set /p DB_NAME="Database Name (acbptxvs_branch_system): "
if "%DB_NAME%"=="" set DB_NAME=acbptxvs_branch_system

set /p DB_PASS="MySQL Password: "

echo Applying collation fixes...

mysql -u %DB_USER% -p%DB_PASS% %DB_NAME% < fix_collation_sql.sql

if %errorlevel% equ 0 (
    echo ✓ Collation fix completed successfully!
    echo ✓ Your Django application should now work without collation errors
) else (
    echo ✗ Fix failed. Please check your credentials and try again.
)

pause