error upgrading database
Posted: 17 December 2020, 16:37
So, I've read this thread and followed the instructions on the wiki. When I'm testing my upgradeTableDb function in studio I'm getting this error:
I'm trying to add 3 columns to the orbteam table. When checking the database after the error, I can see that the 3 columns have been added properly. The code is failing on the 2nd line of the applyDbChangeToAllDB function. It fails to update to zz_savepoint_ table. I can't see the savepoint or replay tables in phpMyAdmin, so I'm not sure how to debug this.
Here is the code of this function by the way. Is it still up-to-date?
Code: Select all
Error while processing SQL request (leto.boardgamearena.com via TCP/IP): ALTER TABLE zz_savepoint_orbteam ADD team_move INT UNSIGNED NOT NULL DEFAULT 0, ADD `team_crossbarrier` tinyint(4) NOT NULL DEFAULT 0, ADD `team_crosswall` tinyint(4) NOT NULL DEFAULT 0; Table 'ebd_raceforthegalaxy_218368.zz_savepoint_orbteam' doesn't existHere is the code of this function by the way. Is it still up-to-date?
Code: Select all
function applyDbChangeToAllDB($sql)
{
self::DbQuery(str_replace('DBPREFIX_', '', $sql));
self::DbQuery(str_replace('DBPREFIX_', 'zz_savepoint_', $sql));
self::DbQuery(str_replace('DBPREFIX_', 'zz_replay1_', $sql));
self::DbQuery(str_replace('DBPREFIX_', 'zz_replay2_', $sql));
self::DbQuery(str_replace('DBPREFIX_', 'zz_replay3_', $sql));
}