PLAYER_PER_ACCOUNT 5: player_index.pid5 in the login/empire/monarch queries, char_change_empire sized by PLAYER_PER_ACCOUNT, slot check relaxed; client gate mt20261029. tools/player-slots5 adds pid5. tools/player-deleted-sync: PLAYER_DELETE copies with SELECT *, so player_deleted must match player column for column; the conqueror schema now adds its columns to player_deleted too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
582 B
Bash
11 lines
582 B
Bash
#!/bin/sh
|
|
# Five character slots: player_index.pid5. Idempotent.
|
|
# sh install.sh <player db> e.g. sh install.sh player_sb
|
|
# Install before starting a db/game built with ENABLE_PLAYER_PER_ACCOUNT5 (its login queries select pid5).
|
|
set -e
|
|
DB=${1:?player db}
|
|
HERE=$(cd "$(dirname "$0")" && pwd)
|
|
HAS=$(mysql -uroot -N "$DB" -e "SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='$DB' AND TABLE_NAME='player_index' AND COLUMN_NAME='pid5'")
|
|
[ "$HAS" = 0 ] && mysql -uroot "$DB" < "$HERE/schema.sql"
|
|
mysql -uroot "$DB" -e "SHOW COLUMNS FROM player_index LIKE 'pid%'"
|