Cannot delete characters after creating them?

Skyyr

New Member
Joined
Apr 11, 2021
Messages
3
Hello,

I recently set up an mtgserver instance on Ubuntu 16.04. This is a fresh install with no custom work or mods. I can connect and create new characters just fine; however, when I go to delete a character, I get the following error: "The server failed to delete your character. This is indicative of a server problem. Please try again."

Again, there's no custom anything. This is straight out of setup.

If I set up a straight install of Core3 from SWGEmu, this is not an issue.

Any ideas on what may be happening? This happened on two separate clean installs, forked directly from the current mtgserver branch.
 
Last edited:

Skyyr

New Member
Joined
Apr 11, 2021
Messages
3
Oi. Where you been Skyyr?
Depends on the last time I encountered you, lol. When did we meet?

[BTW, I'm the original Skyyr from Shadowfire, circa 2003. Some unoriginal stole my name after the fact and used it as a Dev name on one of the servers awhile back for an Emu project. Some people confuse me for that player.]
 
Last edited:

Skyyr

New Member
Joined
Apr 11, 2021
Messages
3
After some digging into the server logs and reviewing the database schema, I located the source of the error.

Apparently, the current swgemu.sql file in the mtgserver repo lacks a "db_deleted" column in the deleted_characters table when the table is first created. The last line of the swgemu.sql file contains an ALTER statement to add this column, but it isn't applying/updating the table in my case, for whatever reason. Several clean installs and I have this issue without any errors being produced in the logs.

Manually adding this column fixes the issue.

For anyone else experiencing the issue, you can fix it by running the following on your database. Connect to your MySQL server and run:

Code:
/* replace swgemu with whatever your MTG server's MySQL database name is - it should be swgemu by default */
use swgemu;
ALTER TABLE deleted_characters ADD  db_deleted BOOLEAN after creation_date;
 
Last edited:

Samsh0

New Member
Joined
Apr 8, 2018
Messages
7
Very strange, I just built the server myself around the same time you did and that column WAS written for me, but for some reason it wasn't for you. Maybe some sort of permission issue on ubuntu's part? that's my guess, good thing you found the issue.
 

Aeryna

Active Member
Joined
Oct 10, 2017
Messages
312
After some digging into the server logs and reviewing the database schema, I located the source of the error.

Apparently, the current swgemu.sql file in the mtgserver repo lacks a "db_deleted" column in the deleted_characters table when the table is first created. The last line of the swgemu.sql file contains an ALTER statement to add this column, but it isn't applying/updating the table in my case, for whatever reason. Several clean installs and I have this issue without any errors being produced in the logs.

Manually adding this column fixes the issue.

For anyone else experiencing the issue, you can fix it by running the following on your database. Connect to your MySQL server and run:

Code:
/* replace swgemu with whatever your MTG server's MySQL database name is - it should be swgemu by default */
use swgemu;
ALTER TABLE deleted_characters ADD  db_deleted BOOLEAN after creation_date;
Have you checked if you got your account_ips table aswell?.

If not, create it using:

Code:
CREATE TABLE account_ips (account_id INT(10), galaxy_id INT(5), ip VARCHAR(15), logout INT(10), online_count CHAR(255));
 
Top Bottom