From 76a01f1390603c25f9e0b9f65d84a7ea978c9b7b Mon Sep 17 00:00:00 2001 From: Christopher <1289128+dragonfire1119@users.noreply.github.com> Date: Sun, 22 Mar 2026 15:15:44 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20add=20MariaDB=20external?= =?UTF-8?q?=5Fid=20column=20fix=20(#77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add database container ID variable and implement fix_external_id function to modify the external_id column for MariaDB compatibility. This resolves user creation failures by ensuring the column definition matches MariaDB requirements. Execute the fix during panel startup before user creation. --- start-pterodactyl-panel/run.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/start-pterodactyl-panel/run.sh b/start-pterodactyl-panel/run.sh index 7120783..c1284ab 100644 --- a/start-pterodactyl-panel/run.sh +++ b/start-pterodactyl-panel/run.sh @@ -2,6 +2,7 @@ LOG_FILE="pterodactyl_panel_log.txt" CONTAINER_ID="pterodactyl-panel" +DB_CONTAINER_ID="big-bear-pterodactyl-panel-database-1" log() { local message="$1" @@ -27,6 +28,15 @@ optimize_cache() { log "Laravel cache optimized successfully." } +fix_external_id() { + log "Fixing external_id column for MariaDB compatibility..." + if docker exec -i $DB_CONTAINER_ID mysql -u pterodactyl -pcasaos panel -e "ALTER TABLE users MODIFY external_id varchar(191) DEFAULT NULL;" 2>/dev/null; then + log "external_id column fixed successfully." + else + log "WARNING: Could not fix external_id column. User creation may fail." + fi +} + prompt_check_login() { echo "Please check your website URL to see if it shows the login." | tee -a $LOG_FILE } @@ -45,6 +55,7 @@ main() { log "Starting script..." generate_key optimize_cache + fix_external_id prompt_check_login create_user log "Script finished."