mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add "Bans" table to database schema
The "Bans" table creates a DB structure for the ability to ban IP addresses. It takes an IP address converted by ip2long(). The table will eventually be able to be populated directly through the web interface by Trusted Users and Developers. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
4fc1b9a0ca
commit
de2392fed0
2 changed files with 18 additions and 0 deletions
10
UPGRADING
10
UPGRADING
|
@ -11,6 +11,16 @@ ALTER TABLE Users
|
|||
ADD COLUMN LastLoginIPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0;
|
||||
----
|
||||
|
||||
2. Add a new "Bans" table:
|
||||
|
||||
----
|
||||
CREATE TABLE Bans (
|
||||
IPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
BanTS TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY (IPAddress)
|
||||
) ENGINE = InnoDB;
|
||||
----
|
||||
|
||||
From 2.0.0 to 2.1.0
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -213,3 +213,11 @@ CREATE TABLE IF NOT EXISTS TU_Votes (
|
|||
FOREIGN KEY (VoteID) REFERENCES TU_VoteInfo(ID) ON DELETE CASCADE,
|
||||
FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
-- Malicious user banning
|
||||
--
|
||||
CREATE TABLE Bans (
|
||||
IPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
BanTS TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY (IPAddress)
|
||||
) ENGINE = InnoDB;
|
||||
|
|
Loading…
Add table
Reference in a new issue