Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database error when assigning human player to team #63

Open
CaptainKita opened this issue Apr 1, 2019 · 1 comment
Open

Database error when assigning human player to team #63

CaptainKita opened this issue Apr 1, 2019 · 1 comment

Comments

@CaptainKita
Copy link

Fatal error: Uncaught exception 'Exception' with message 'Database Query Error: Table 'd02dfe9f._badge' doesn't exist' in /www/htdocs/w014cd6a/websoccer2.kackwurm.at/classes/DbConnection.class.php:286 Stack trace: #0 /www/htdocs/w014cd6a/websoccer2.kackwurm.at/classes/DbConnection.class.php(91): DbConnection->executeQuery('SELECT id, name...') #1 /www/htdocs/w014cd6a/websoccer2.kackwurm.at/classes/services/BadgesDataService.class.php(53): DbConnection->querySelect('id, name, level', '_badge', 'event = '%s' AN...', Array, 1) #2 /www/htdocs/w014cd6a/websoccer2.kackwurm.at/index.php(74): BadgesDataService::awardBadgeIfApplicable(Object(WebSoccer), Object(DbConnection), '1', 'membership_sinc...', 0) #3 {main} thrown in /www/htdocs/w014cd6a/websoccer2.kackwurm.at/classes/DbConnection.class.php on line 286

@CaptainKita
Copy link
Author

So for some reason some tables in the database weren't generated.

If someone else ever gets on of these:
in the install folder there is the file "ws3_ddl_full.sql" open that, search for whatever is missing in your database, copy, for example, this (if _badge is missing):

CREATE TABLE ws3_badge ( id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(128) NOT NULL, description VARCHAR(255) NULL, level ENUM('bronze', 'silver', 'gold') NOT NULL DEFAULT 'bronze', event ENUM('membership_since_x_days', 'win_with_x_goals_difference', 'completed_season_at_x', 'x_trades', 'cupwinner', 'stadium_construction_by_x') NOT NULL, event_benchmark INT(10) NOT NULL DEFAULT 0 ) DEFAULT CHARSET=utf8, ENGINE=InnoDB;

and delete the "ws3" in the name and the ENGINE=InnoDB part at the end. Also look that no PRIMARY KEY is set to NULL. If that's the case just set it to NOT NULL

That should create the table in your db and should work.
(woked for my with _badge, _randomevent_occurrence, _randomevent and _leaguehistory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant