CREATE TABLE `dotfeed` (
	`OXID` CHAR(32) NOT NULL,
	`OXMAPID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`OXSHOPID` INT(11) NOT NULL DEFAULT '1',
	`OXACTIVE` TINYINT(1) NOT NULL DEFAULT '1',
	`DOTIDENT` VARCHAR(128) NOT NULL,
	`DOTTITLE` VARCHAR(255) NOT NULL,
	`DOTDESCRIPTION` VARCHAR(255) NOT NULL,
	`DOTTEMPLATE` TEXT NOT NULL,
	`DOTTEMPLATE_1` TEXT NOT NULL,
	`DOTTEMPLATE_2` TEXT NOT NULL,
	`DOTTEMPLATE_3` TEXT NOT NULL,
	`DOTDATATYPE` ENUM('category','article','content','feed') NULL DEFAULT NULL,
	`DOTFILETYPE` ENUM('txt','csv','json','xml') NOT NULL DEFAULT 'txt',
	`DOTMINIFY` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
	`DOTARTICLEACTIVE` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
	`DOTARTICLEHIDDEN` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`DOTARTICLESTOCK` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
	`DOTARTICLEPARENT` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`DOTCATEGORYACTIVE` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
	`DOTCATEGORYHIDDEN` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`DOTCATEGORYEMPTY` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`DOTCATEGORYCONENT` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`DOTCONTENTACTIVE` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
	`DOTCONTENTTYPE` SET('0','1','2','3','4','5') NULL DEFAULT NULL,
	`DOTLASTCOUNT` INT(11) NOT NULL DEFAULT '0',
	`DOTLASTCALL` TIMESTAMP NULL DEFAULT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`OXID`),
	UNIQUE INDEX `dotident` (`DOTIDENT`),
	INDEX `oxmapid` (`OXMAPID`),
	INDEX `oxshopid` (`OXSHOPID`),
	INDEX `oxactive` (`OXACTIVE`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=19
;

CREATE TABLE `dotfeed2shop` (
	`OXSHOPID` INT(11) NOT NULL,
	`OXMAPOBJECTID` INT(11) NOT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	UNIQUE INDEX `OXMAPIDX` (`OXSHOPID`, `OXMAPOBJECTID`),
	INDEX `OXMAPOBJECTID` (`OXMAPOBJECTID`),
	INDEX `OXSHOPID` (`OXSHOPID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
ROW_FORMAT=COMPACT
;

CREATE TABLE `dotarticle2feed` (
	`OXID` CHAR(32) NOT NULL,
	`OXOBJECTID` CHAR(32) NOT NULL,
	`DOTFEEDID` CHAR(32) NOT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`OXID`),
	INDEX `oxobjectid` (`OXOBJECTID`),
	INDEX `oxarticleid` (`DOTFEEDID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

CREATE TABLE `dotcategory2feed` (
	`OXID` CHAR(32) NOT NULL,
	`OXOBJECTID` CHAR(32) NOT NULL,
	`DOTFEEDID` CHAR(32) NOT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`OXID`),
	INDEX `oxobjectid` (`OXOBJECTID`),
	INDEX `oxcategoryid` (`DOTFEEDID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

CREATE TABLE `dotcontent2feed` (
	`OXID` CHAR(32) NOT NULL,
	`OXOBJECTID` CHAR(32) NOT NULL,
	`DOTFEEDID` CHAR(32) NOT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`OXID`),
	INDEX `oxobjectid` (`OXOBJECTID`),
	INDEX `oxcontentid` (`DOTFEEDID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

CREATE TABLE `dotfeed2feed` (
	`OXID` CHAR(32) NOT NULL,
	`OXOBJECTID` CHAR(32) NOT NULL,
	`DOTFEEDID` CHAR(32) NOT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`OXID`),
	INDEX `oxobject` (`OXOBJECTID`),
	INDEX `dotfeedid` (`DOTFEEDID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

CREATE TABLE `dotmanufacturer2feed` (
	`OXID` CHAR(32) NOT NULL,
	`OXOBJECTID` CHAR(32) NOT NULL,
	`DOTFEEDID` CHAR(32) NOT NULL,
	`OXTIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	PRIMARY KEY (`OXID`),
	INDEX `oxobjectid` (`OXOBJECTID`),
	INDEX `oxmanufacturerid` (`DOTFEEDID`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
