
# 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;

#-----------------------------------------------------------------------------
#-- media_vimeo
#-----------------------------------------------------------------------------

DROP TABLE IF EXISTS `media_vimeo`;


CREATE TABLE `media_vimeo`
(
	`mid` INTEGER(11)  NOT NULL,
	`vimeo` VARCHAR(1024),
	`id` VARCHAR(255),
	`title` VARCHAR(255),
	`description` TEXT,
	`keywords` TEXT,
	`thumbnail` VARCHAR(1024),
	`url` VARCHAR(1024),
	`duration` INTEGER(11),
	`width` INTEGER(11),
	`height` INTEGER(11),
	`owner` VARCHAR(255),
	`created_at` DATETIME  NOT NULL,
	`updated_at` DATETIME  NOT NULL,
	PRIMARY KEY (`mid`),
	KEY `mvi_i_id`(`id`),
	CONSTRAINT `mvi_fk_mid`
		FOREIGN KEY (`mid`)
		REFERENCES `media` (`mid`)
)Engine=InnoDB;

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