CREATE TABLE IF NOT EXISTS `ext_webgate_media` (
  `media_id` int(10) unsigned NOT NULL auto_increment,
  `parent_id` int(10) unsigned NOT NULL,
  `media_type` enum('picture','video','audio') NOT NULL default 'picture',
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `thumbnail` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `oid` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  `video_source` enum('youtube','vimeo','google_video') NOT NULL default 'youtube',
  `media_mimetype` varchar(30) NOT NULL,
  `object_width` int(10) unsigned NOT NULL,
  `object_height` int(10) unsigned NOT NULL,
  `external_id` varchar(255) NOT NULL,
  PRIMARY KEY  (`media_id`),
  KEY `parent_id` (`parent_id`),
  KEY `oid` (`oid`),
  KEY `position` (`position`)
) ;
