You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
Once an IPID ban has been logged into the database, the same IPID can never be banned again in the future, sending the following error into OOC: "Error inserting ban: UNIQUE constraint failed: ip_bans.ipid (the IPID may not exist)". As suggested by sD, this is fixable by changing ipid data type in ip_bans from TEXT PRIMARY KEY to INTEGER NOT NULL, but needs to be implemented in the code at database creation. Also, HDID bans haven't been tested.
The text was updated successfully, but these errors were encountered:
Here's the actual solution. In migrations/v4.sql we need to replace
CREATE TABLE ip_bans_new( ipid TEXT PRIMARY KEY,
with
CREATE TABLE ip_bans_new( ipid INTEGER NOT NULL,
Since I have little experience with SQL, I'm not sure whether INTEGER NOT NULL or INTEGER PRIMARY KEY would be more applicable here, but the former, as I am inclined to repeat, is stonedDiscord's first glance intended solution.
Once an IPID ban has been logged into the database, the same IPID can never be banned again in the future, sending the following error into OOC: "Error inserting ban: UNIQUE constraint failed: ip_bans.ipid (the IPID may not exist)". As suggested by sD, this is fixable by changing ipid data type in ip_bans from TEXT PRIMARY KEY to INTEGER NOT NULL, but needs to be implemented in the code at database creation. Also, HDID bans haven't been tested.
The text was updated successfully, but these errors were encountered: