2019-07-07 15:45:23 +02:00
|
|
|
CREATE TABLE IF NOT EXISTS `retriever_rule` (
|
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`uid` int(11) NOT NULL,
|
|
|
|
`contact-id` int(11) NOT NULL,
|
|
|
|
`data` mediumtext NULL DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `uid` (`uid`),
|
|
|
|
KEY `contact-id` (`contact-id`)
|
2022-10-02 20:18:48 +02:00
|
|
|
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
2019-07-07 15:45:23 +02:00
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `retriever_item` (
|
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
2022-10-02 20:18:48 +02:00
|
|
|
`item-uri` varbinary(255) NOT NULL,
|
2019-07-07 15:45:23 +02:00
|
|
|
`item-uid` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`resource` int(11) NOT NULL,
|
|
|
|
`finished` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
|
|
|
KEY `resource` (`resource`),
|
|
|
|
KEY `finished` (`finished`),
|
|
|
|
KEY `item-uid` (`item-uid`),
|
|
|
|
KEY `all` (`item-uri`, `item-uid`, `contact-id`),
|
|
|
|
PRIMARY KEY (`id`)
|
2022-10-02 20:18:48 +02:00
|
|
|
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
2019-07-07 15:45:23 +02:00
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `retriever_resource` (
|
|
|
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
2019-09-22 11:47:30 +02:00
|
|
|
`item-uid` int(10) unsigned NOT NULL DEFAULT '0',
|
2019-07-24 07:48:23 +02:00
|
|
|
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
|
2019-07-07 15:45:23 +02:00
|
|
|
`type` char(255) NULL DEFAULT NULL,
|
|
|
|
`binary` int(1) NOT NULL DEFAULT 0,
|
2022-10-02 21:19:08 +02:00
|
|
|
`url` varbinary(700) NOT NULL,
|
2019-07-07 15:45:23 +02:00
|
|
|
`created` timestamp NOT NULL DEFAULT now(),
|
|
|
|
`completed` timestamp NULL DEFAULT NULL,
|
|
|
|
`last-try` timestamp NULL DEFAULT NULL,
|
|
|
|
`num-tries` int(11) NOT NULL DEFAULT 0,
|
|
|
|
`data` mediumblob NULL DEFAULT NULL,
|
|
|
|
`http-code` smallint(1) unsigned NULL DEFAULT NULL,
|
2022-10-02 21:19:08 +02:00
|
|
|
`redirect-url` varbinary(700) NOT NULL,
|
2019-09-27 21:02:52 +02:00
|
|
|
KEY `url` (`url`),
|
|
|
|
KEY `completed` (`completed`),
|
2019-07-07 15:45:23 +02:00
|
|
|
PRIMARY KEY (`id`)
|
2022-10-02 20:18:48 +02:00
|
|
|
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|