From 751a97eda9edd0089b54415d575efa0194cded46 Mon Sep 17 00:00:00 2001 From: Go Johansson Date: Sun, 25 Dec 2022 15:58:49 +0100 Subject: [PATCH] added ratelimit --- src/static/dbSchemas/mysql_schema.sql | 9 +++++++++ src/static/dbSchemas/sqlite_schema.sql | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/src/static/dbSchemas/mysql_schema.sql b/src/static/dbSchemas/mysql_schema.sql index f5ecb9b..5a7d813 100644 --- a/src/static/dbSchemas/mysql_schema.sql +++ b/src/static/dbSchemas/mysql_schema.sql @@ -24,3 +24,12 @@ CREATE TABLE `blacklist` ( `time` int(15) DEFAULT NULL, PRIMARY KEY (`id`) ); + +CREATE TABLE `ratelimit` +( + `id` int(20) unsigned NOT NULL auto_increment, + `iphash` char(40) DEFAULT NULL, + `files` int(15) default NULL, + `time` int(15) DEFAULT NULL, + PRIMARY KEY (`id`) +); \ No newline at end of file diff --git a/src/static/dbSchemas/sqlite_schema.sql b/src/static/dbSchemas/sqlite_schema.sql index 9354ab4..f26b65b 100644 --- a/src/static/dbSchemas/sqlite_schema.sql +++ b/src/static/dbSchemas/sqlite_schema.sql @@ -28,4 +28,10 @@ CREATE TABLE `ratelimit` ( , `time` integer default NULL , `files` integer default NULL ); +CREATE TABLE `ratelimit`( + `id` integer NOT NULL PRIMARY KEY AUTOINCREMENT +, `iphash` char(40) default NULL +, `files` integer default NULL +, `time` integer default NULL +); END TRANSACTION;