forked from anvyst/domain_blocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain_blocker.sql
26 lines (25 loc) · 1012 Bytes
/
domain_blocker.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
DROP TABLE IF EXISTS `mod_domains_blocked`;
CREATE TABLE `mod_domains_blocked` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ipaddress` varchar(100) DEFAULT NULL,
`domain` varchar(200) DEFAULT NULL,
`attempts` int(11) DEFAULT '0',
`description` mediumtext,
`created` datetime DEFAULT NULL,
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_domain` (`domain`),
KEY `idx_ipaddress` (`ipaddress`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mod_domain_blocker`;
CREATE TABLE `mod_domain_blocker` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`pattern` varchar(200) NOT NULL,
`pattern_type` enum('regexp','string') NOT NULL,
`activated` tinyint(4) DEFAULT '1',
`created` datetime DEFAULT NULL,
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_pattern` (`pattern`),
KEY `idx_activated` (`activated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;