-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathredirection.sql
More file actions
79 lines (74 loc) · 3.84 KB
/
redirection.sql
File metadata and controls
79 lines (74 loc) · 3.84 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
CREATE TABLE IF NOT EXISTS `wp_redirection_items` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`url` mediumtext NOT NULL,
`match_url` VARCHAR(2000) DEFAULT NULL,
`match_data` TEXT,
`regex` INT(11) unsigned NOT NULL DEFAULT '0',
`position` INT(11) unsigned NOT NULL DEFAULT '0',
`last_count` INT(10) unsigned NOT NULL DEFAULT '0',
`last_access` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
`group_id` INT(11) NOT NULL DEFAULT '0',
`status` enum('enabled','disabled') NOT NULL DEFAULT 'enabled',
`action_type` VARCHAR(20) NOT NULL,
`action_code` INT(11) unsigned NOT NULL,
`action_data` MEDIUMTEXT,
`match_type` VARCHAR(20) NOT NULL,
`title` TEXT,
PRIMARY KEY (`id`),
KEY `url` (`url`(191)),
KEY `status` (`status`),
KEY `regex` (`regex`),
KEY `group_idpos` (`group_id`, `position`),
KEY `group` (`group_id`),
KEY `match_url` (`match_url`(191))
) DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE IF NOT EXISTS `wp_redirection_groups` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`tracking` INT(11) NOT NULL DEFAULT '1',
`module_id` INT(11) unsigned NOT NULL DEFAULT '0',
`status` enum('enabled','disabled') NOT NULL DEFAULT 'enabled',
`position` INT(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `module_id` (`module_id`),
KEY `status` (`status`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE IF NOT EXISTS `wp_redirection_logs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`created` datetime NOT NULL,
`url` MEDIUMTEXT NOT NULL,
`domain` VARCHAR(255) DEFAULT NULL,
`sent_to` MEDIUMTEXT,
`agent` MEDIUMTEXT,
`referrer` MEDIUMTEXT,
`http_code` INT(11) unsigned NOT NULL DEFAULT '0',
`request_method` VARCHAR(10) DEFAULT NULL,
`request_data` MEDIUMTEXT,
`redirect_by` VARCHAR(50) DEFAULT NULL,
`redirection_id` INT(11) unsigned DEFAULT NULL,
`ip` VARCHAR(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `created` (`created`),
KEY `redirection_id` (`redirection_id`),
KEY `ip` (`ip`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE IF NOT EXISTS `wp_redirection_404` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`created` datetime NOT NULL,
`url` MEDIUMTEXT NOT NULL,
`domain` VARCHAR(255) DEFAULT NULL,
`agent` VARCHAR(255) DEFAULT NULL,
`referrer` VARCHAR(255) DEFAULT NULL,
`http_code` INT(11) unsigned NOT NULL DEFAULT '0',
`request_method` VARCHAR(10) DEFAULT NULL,
`request_data` MEDIUMTEXT,
`ip` VARCHAR(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `created` (`created`),
KEY `referrer` (`referrer`(191)),
KEY `ip` (`ip`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
DELETE FROM `wp_redirection_groups` WHERE id IN (1, 2);
INSERT INTO `wp_redirection_groups` (id,name,tracking,module_id,status,`position`) VALUES
(1,'Redirections',1,1,'enabled',0),
(2,'Modified Posts',1,1,'enabled',1);