
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;

#-----------------------------------------------------------------------------
#-- mediaimport_queue
#-----------------------------------------------------------------------------

DROP TABLE IF EXISTS `mediaimport_queue`;


CREATE TABLE `mediaimport_queue`
(
	`miqid` INTEGER(11)  NOT NULL AUTO_INCREMENT,
	`importtype` INTEGER(11)  NOT NULL,
	`status` INTEGER(11) default 0 NOT NULL,
	`options` TEXT  NOT NULL,
	`progress` INTEGER(3) default 0 NOT NULL,
	`created_at` DATETIME  NOT NULL,
	`updated_at` DATETIME  NOT NULL,
	PRIMARY KEY (`miqid`),
	KEY `miq_i_created_at`(`created_at`),
	KEY `miq_i_type_status`(`importtype`, `status`),
	KEY `miq_i_status`(`status`)
)Engine=InnoDB;

# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
