Files
NeveTimePanel/MIGRATE_USERS.bat

60 lines
1.3 KiB
Batchfile

@echo off
echo ========================================
echo MC Panel - User Migration v1.1.0
echo ========================================
echo.
echo [INFO] Starting user migration...
echo [INFO] This will add Owner role and permissions system
echo.
REM Check if Python is installed
python --version >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Python is not installed!
echo.
echo Please install Python 3.11+ from:
echo https://www.python.org/downloads/
echo.
pause
exit /b 1
)
REM Check if users.json exists
if not exist "backend\users.json" (
echo [WARNING] users.json not found!
echo.
echo This is normal if you haven't started the panel yet.
echo Start the panel first to create users.json
echo.
pause
exit /b 1
)
echo [STEP 1/3] Creating backup...
cd backend
python migrate_users.py
if %ERRORLEVEL% EQU 0 (
echo.
echo ========================================
echo [SUCCESS] Migration completed!
echo ========================================
echo.
echo Next steps:
echo 1. Restart the panel
echo 2. Login as owner
echo 3. Check user permissions
echo.
) else (
echo.
echo [ERROR] Migration failed!
echo.
echo Check the error messages above.
echo Your original users.json is backed up.
echo.
)
cd ..
pause