Hey. Would anyone be kind enough to help me with an issue? I am getting the following error (https://pastebin.com/cGTxCEbW) when trying to create a new filter and I am not sure why. It's asking me if I've run a database update, but I did, assuming it refers to php update.php. Could anyone tell me what the issue is?
Topic on Extension talk:AbuseFilter
@Star Warden: Hi! I'd need a few more info in order to understand what's going on... First of all, what DBMS are you using? And second, what MW version are you on? That query executes correctly for me, so it really sounds like the schema is wrong. It could have to do with missing db patches, or something wrong with the table prefix, or anything else; especially if you confirm that update.php ran without errors. Could you also post the result of running DESCRIBE dmlw_abuse_filter_history
on your DB? Thanks.
Hey. This is the wiki: https://dragon-mania-legends-wiki.mobga.me/Special:version (MySQL 8.0.17 / MW 1.33). Running that query doesn't do anything, it seems.... However, when I've checked that specific table (actually, any table), I am getting this error: https://prnt.sc/os1y8e
LE: I managed to run that query, after all. This is the result: https://prnt.sc/os2201
@Star Warden: Thanks! So, the last link shows that the column afh_deleted is indeed missing from the schema. And I see the afh_group column is also missing. And at this point, I also suspect other inconsistencies in the other tables. I see that afh_group is added together with abuse_filter.af_group, and afh_deleted together with abuse_filter.af_deleted. So, could you please post the result of DESCRIBE dmlw_abuse_filter
? This way I'll be able to check why the DB patch wasn't applied. If that's possible for you, I'd also like to see the output of php update.php for what concerns AbuseFilter. That should be the part between ...abuse_filter table already exists
and ...afl_namespace in table abuse_filter_log
.
It'd also be useful to see the schema for the other tables, i.e. the results of DESCRIBE dmlw_abuse_filter_action
and DESCRIBE dmlw_abuse_filter_log
, so to see if there are other inconsistencies. Thanks!
Hey again. Here is everything you requested: https://imgur.com/a/ylZPvgM
@Star Warden: That's weird. The corresponding fields in the abuse_filter table exist, and they're added by the same patch, example. The updater is not re-applying the patch because it only checks if the field in the abuse_filter table is there. Since it is, it considers the update as already executed. This is weird, though, because the db patch hasn't been changed since 2012.
At this point, I can't really say what happened. My only suggestion is to manually re-apply the missing part of the patches, so:
ALTER TABLE dmlw_abuse_filter_history add column afh_group varchar(64) binary NULL;
ALTER TABLE dmlw_abuse_filter_history ADD COLUMN afh_deleted tinyint(1) NOT NULL DEFAULT 0;
The other tables are fine.
That solved it. Thanks a lot!