mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 07:54:14 +00:00
dbstickybans: Qdeleting queries, misc fixes, Query select proc for executing mutiple queries at once...
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255.
|
||||
|
||||
The latest database version is 4.7; The query to update the schema revision table is:
|
||||
The latest database version is 5.1; The query to update the schema revision table is:
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 1);
|
||||
or
|
||||
@@ -10,7 +10,7 @@ In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Version 5.1, 23 Dec 2018, by MrStonedOne
|
||||
Version 5.1, 25 Feb 2018, by MrStonedOne
|
||||
Added four tables to enable storing of stickybans in the database since byond can lose them, and to enable disabling stickybans for a round without depending on a crash free round. Existing stickybans are automagically imported to the tables.
|
||||
|
||||
CREATE TABLE `stickyban` (
|
||||
@@ -24,7 +24,8 @@ CREATE TABLE `stickyban` (
|
||||
CREATE TABLE `stickyban_matched_ckey` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_ckey` VARCHAR(32) NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`exempt` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`stickyban`, `matched_ckey`)
|
||||
) ENGINE=InnoDB;
|
||||
@@ -32,14 +33,16 @@ CREATE TABLE `stickyban_matched_ckey` (
|
||||
CREATE TABLE `stickyban_matched_ip` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_ip` INT UNSIGNED NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`stickyban`, `matched_ip`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `stickyban_matched_cid` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_cid` INT UNSIGNED NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`matched_cid` VARCHAR(32) NOT NULL,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`stickyban`, `matched_cid`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
|
||||
@@ -465,10 +465,10 @@ $$
|
||||
DELIMITER ;
|
||||
|
||||
--
|
||||
-- Table structure for table `SS13_stickyban`
|
||||
-- Table structure for table `stickyban`
|
||||
--
|
||||
DROP TABLE IF EXISTS `SS13_stickyban`;
|
||||
CREATE TABLE `SS13_stickyban` (
|
||||
DROP TABLE IF EXISTS `stickyban`;
|
||||
CREATE TABLE `stickyban` (
|
||||
`ckey` VARCHAR(32) NOT NULL,
|
||||
`reason` VARCHAR(2048) NOT NULL,
|
||||
`banning_admin` VARCHAR(32) NOT NULL,
|
||||
@@ -477,13 +477,14 @@ CREATE TABLE `SS13_stickyban` (
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
-- Table structure for table `ss13_stickyban_matched_ckey`
|
||||
-- Table structure for table `stickyban_matched_ckey`
|
||||
--
|
||||
DROP TABLE IF EXISTS `ss13_stickyban_matched_ckey`;
|
||||
DROP TABLE IF EXISTS `stickyban_matched_ckey`;
|
||||
CREATE TABLE `ss13_stickyban_matched_ckey` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_ckey` VARCHAR(32) NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`exempt` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`stickyban`, `matched_ckey`)
|
||||
) ENGINE=InnoDB;
|
||||
@@ -495,18 +496,20 @@ DROP TABLE IF EXISTS `ss13_stickyban_matched_ip`;
|
||||
CREATE TABLE `ss13_stickyban_matched_ip` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_ip` INT UNSIGNED NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`stickyban`, `matched_ip`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
-- Table structure for table `ss13_stickyban_matched_cid`
|
||||
-- Table structure for table `stickyban_matched_cid`
|
||||
--
|
||||
DROP TABLE IF EXISTS `ss13_stickyban_matched_cid`;
|
||||
CREATE TABLE `ss13_stickyban_matched_cid` (
|
||||
DROP TABLE IF EXISTS `stickyban_matched_cid`;
|
||||
CREATE TABLE `stickyban_matched_cid` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_cid` INT UNSIGNED NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`matched_cid` VARCHAR(32) NOT NULL,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`stickyban`, `matched_cid`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
|
||||
@@ -483,7 +483,8 @@ DROP TABLE IF EXISTS `ss13_stickyban_matched_ckey`;
|
||||
CREATE TABLE `ss13_stickyban_matched_ckey` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_ckey` VARCHAR(32) NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`exempt` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`stickyban`, `matched_ckey`)
|
||||
) ENGINE=InnoDB;
|
||||
@@ -495,7 +496,8 @@ DROP TABLE IF EXISTS `ss13_stickyban_matched_ip`;
|
||||
CREATE TABLE `ss13_stickyban_matched_ip` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_ip` INT UNSIGNED NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`stickyban`, `matched_ip`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
@@ -505,8 +507,9 @@ CREATE TABLE `ss13_stickyban_matched_ip` (
|
||||
DROP TABLE IF EXISTS `ss13_stickyban_matched_cid`;
|
||||
CREATE TABLE `ss13_stickyban_matched_cid` (
|
||||
`stickyban` VARCHAR(32) NOT NULL,
|
||||
`matched_cid` INT UNSIGNED NOT NULL,
|
||||
`first_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`matched_cid` VARCHAR(32) NOT NULL,
|
||||
`first_matched` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_matched` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`stickyban`, `matched_cid`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user