/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50544
 Source Host           : localhost
 Source Database       : mm_admin

 Target Server Type    : MySQL
 Target Server Version : 50544
 File Encoding         : utf-8

 Date: 02/09/2016 14:28:30 PM
*/


-- ----------------------------
--  Table structure for `browsers`
-- ----------------------------
CREATE TABLE `browsers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_agent` varchar(255) NOT NULL,
  `browser` varchar(64) NOT NULL,
  `version` float NOT NULL,
  `version_maj` int(11) NOT NULL,
  `version_min` int(11) NOT NULL,
  `platform` varchar(32) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index` (`user_agent`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Logs details about client browsers.';

-- ----------------------------
--  Records of `browsers`
-- ----------------------------
BEGIN;
INSERT INTO `browsers` VALUES ('1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:23.0) Gecko/20100101 Firefox/23.0', 'Default Browser', '0', '0', '0', 'Unknown'), ('2', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36', 'Default Browser', '0', '0', '0', 'Unknown'), ('3', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36', 'Default Browser', '0', '0', '0', 'Unknown');
COMMIT;

-- ----------------------------
--  Table structure for `columns`
-- ----------------------------
CREATE TABLE `columns` (
  `id` varchar(255) NOT NULL,
  `display` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `browse` tinyint(1) NOT NULL DEFAULT '0',
  `context` enum('metadata','cuesheet') NOT NULL DEFAULT 'metadata' COMMENT 'Indicates the application context where this column is valid.',
  `link` enum('none','field','word') DEFAULT 'field' COMMENT 'Type of live link to use for this column.',
  `split_text` varchar(50) DEFAULT NULL,
  `meta_browse_fields` text,
  PRIMARY KEY (`id`),
  KEY `active` (`active`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Mapping of user columns to database columns.';

-- ----------------------------
--  Records of `columns`
-- ----------------------------
BEGIN;
INSERT INTO `columns` VALUES ('Database', 'Database', '1', '0', 'metadata', 'field', '', null), ('Relevance', 'Relevance', '1', '1', 'metadata', null, '', null), ('RecID', 'RecID', '1', '1', 'metadata', 'field', '', null), ('Filename', 'Filename', '1', '0', 'metadata', 'field', '', null), ('Pathname', 'Pathname', '0', '0', 'metadata', 'field', '', null), ('FilePath', 'FilePath', '1', '1', 'metadata', 'field', '', null), ('Description', 'Track Description', '1', '1', 'metadata', 'word', '', null), ('Source', 'Source', '0', '0', 'metadata', 'field', '', null), ('Duration', 'Length', '1', '1', 'metadata', 'field', '', null), ('Category', 'Category', '1', '1', 'metadata', 'field', '', null), ('SubCategory', 'Genres', '0', '0', 'metadata', 'field', '', null), ('_FlatCategory', '_FlatCategory', '0', '0', 'metadata', 'field', '', null), ('Manufacturer', 'Manufacturer', '0', '0', 'metadata', 'field', '', null), ('Designer', 'Designer', '0', '0', 'metadata', 'field', '', null), ('Show', 'Disc Description', '0', '0', 'metadata', 'field', '', null), ('Library', 'Library', '1', '1', 'metadata', 'field', '', null), ('Notes', 'Genre', '0', '0', 'metadata', 'field', '', null), ('RecType', 'RecType', '0', '0', 'metadata', 'field', '', null), ('ShortID', 'jasrac id', '1', '1', 'metadata', 'field', '', null), ('LongID', 'LongID', '0', '0', 'metadata', 'field', '', null), ('RecMedium', 'RecMedium', '0', '0', 'metadata', 'field', '', null), ('Rating', 'Rating', '0', '0', 'metadata', 'field', '', null), ('Location', 'Styles', '0', '0', 'metadata', 'field', '', null), ('Microphone', 'Microphone', '0', '0', 'metadata', 'field', '', null), ('Keywords', 'Keywords', '1', '1', 'metadata', 'word', ',', null), ('Composer', 'Composer', '1', '1', 'metadata', 'field', '', null), ('Publisher', 'Publisher', '1', '1', 'metadata', 'field', '', null), ('Performer', 'Performer', '0', '0', 'metadata', 'field', '', null), ('Arranger', 'Arranger', '0', '0', 'metadata', 'field', '', null), ('Conductor', 'Conductor', '0', '0', 'metadata', 'field', '', null), ('TrackTitle', 'Track Title', '1', '1', 'metadata', 'field', '', null), ('CDTitle', 'Disc Title', '1', '1', 'metadata', 'field', '', null), ('CDDescription', 'Disc Description', '1', '1', 'metadata', 'word', ', ', null), ('FeaturedInstrument', 'Instruments', '1', '0', 'metadata', 'field', '', null), ('Scene', 'Scene', '0', '0', 'metadata', 'field', '', null), ('Take', 'Take', '0', '0', 'metadata', 'field', '', null), ('Tape', 'Tape', '0', '0', 'metadata', 'field', '', null), ('FileType', 'FileType', '0', '0', 'metadata', 'field', '', null), ('CreationDate', 'Creation Date', '0', '0', 'metadata', 'field', '', null), ('ModificationDate', 'ModificationDate', '0', '0', 'metadata', 'field', '', null), ('TotalFrames', 'TotalFrames', '0', '0', 'metadata', 'field', '', null), ('EntryDate', 'EntryDate', '0', '0', 'metadata', 'field', '', null), ('Popularity', 'Popularity', '0', '0', 'metadata', 'field', '', null), ('Split', 'Split', '0', '0', 'metadata', 'field', '', null), ('SplitChannels', 'SplitChannels', '1', '0', 'metadata', 'field', null, null), ('SampleRate', 'SampleRate', '0', '0', 'metadata', 'field', '', null), ('Channels', 'Channels', '0', '0', 'metadata', 'field', '', null), ('_WaveformLink', '_WaveformLink', '0', '0', 'metadata', null, '', null), ('_PictureLink', '_PictureLink', '0', '0', 'metadata', null, '', null), ('_UMID', '_UMID', '0', '0', 'metadata', null, '', null), ('BitDepth', 'BitDepth', '0', '0', 'metadata', 'field', '', null), ('ChannelLayout', 'ChannelLayout', '0', '0', 'metadata', 'field', '', null), ('_Duration', '_Duration', '0', '0', 'metadata', 'field', null, null), ('BPM', 'Tempo', '1', '0', 'metadata', 'field', '', null), ('Key', 'Key', '0', '0', 'metadata', 'field', '', null), ('BWDescription', 'Alt Description', '0', '0', 'metadata', 'word', '', null), ('BWOriginator', 'BWOriginator', '0', '0', 'metadata', 'field', '', null), ('BWOriginatorRef', 'BWOriginatorRef', '0', '0', 'metadata', 'field', '', null), ('FXName', 'FXName', '0', '0', 'metadata', 'field', '', null), ('Time', 'Time', '0', '0', 'metadata', 'field', '', null), ('Volume', 'Disc Number', '1', '1', 'metadata', 'field', '', null), ('Track', 'Track', '1', '0', 'metadata', 'none', '', null), ('Index', 'Index', '0', '0', 'metadata', 'field', '', null), ('Artwork', 'Artwork', '1', '1', 'metadata', null, '', null), ('Waveform', 'Waveform', '1', '0', 'metadata', null, '', null), ('CueNo', 'Cue #', '1', '0', 'cuesheet', null, '', null), ('CueUsage', 'Usage', '1', '0', 'cuesheet', null, '', null), ('CueTime', 'CueTime', '1', '1', 'cuesheet', null, '', null), ('_Dirty', '_Dirty', '0', '0', 'metadata', 'field', '', null), ('Lyrics', 'Lyrics', '1', '0', 'metadata', 'word', '', null), ('Mood', 'Mood', '0', '0', 'metadata', 'field', '', null), ('Version', 'Version', '1', '1', 'metadata', 'field', '', null), ('BWTimeStamp', 'BWTimeStamp', '0', '0', 'metadata', 'field', '', null), ('BWTime', 'BWTime', '0', '0', 'metadata', 'field', '', null), ('BWDate', 'BWDate', '0', '0', 'metadata', 'field', '', null), ('Playlist', 'Playlist', '0', '0', 'metadata', 'field', '', null), ('smint_track_id', 'smint_track_id', '0', '0', 'metadata', 'field', '', null), ('spectral_external_key', 'spectral_external_key', '0', '0', 'metadata', 'field', '', null), ('DateAddedToSystem', 'Date Added', '0', '0', 'metadata', 'field', '', null), ('TouchedDate', 'TouchedDate', '0', '0', 'metadata', 'field', '', null), ('_smint_track_id', '_smint_track_id', '0', '0', 'metadata', 'field', '', null), ('Artist', 'Artist', '0', '0', 'metadata', 'field', '', null), ('Usage', 'Usage', '0', '0', 'metadata', 'field', '', null), ('TrackYear', 'Track Year', '0', '0', 'metadata', 'field', '', null), ('UserComments', 'UserComments', '0', '0', 'metadata', 'field', '', null), ('JDNotes', 'JDNotes', '0', '0', 'metadata', 'field', '', null), ('NewSource', 'NewSource', '0', '0', 'metadata', 'field', '', null), ('Tempo', 'Tempo', '0', '0', 'metadata', 'field', '', null), ('ReleaseDate', 'Release Date', '1', '1', 'metadata', 'field', '', null), ('cdndate', 'cdndate', '0', '0', 'metadata', 'field', '', null), ('cdnstale', 'cdnstale', '0', '0', 'metadata', 'field', '', null), ('foxnewname', 'foxnewname', '0', '0', 'metadata', 'field', '', null), ('ScannedDate', 'ScannedDate', '0', '0', 'metadata', 'field', '', null), ('ISRC', 'ISRC', '0', '0', 'metadata', 'field', '', null), ('URL', 'URL', '0', '0', 'metadata', 'field', '', null), ('_PathnameLink', '_PathnameLink', '0', '0', 'metadata', 'field', '', null), ('_CategoryLink', '_CategoryLink', '0', '0', 'metadata', 'field', '', null), ('_ManufacturerLink', '_ManufacturerLink', '0', '0', 'metadata', 'field', '', null), ('_LibraryLink', '_LibraryLink', '0', '0', 'metadata', 'field', '', null), ('_DesignerLink', '_DesignerLink', '0', '0', 'metadata', 'field', '', null), ('_CDTitleLink', '_CDTitleLink', '0', '0', 'metadata', 'field', '', null), ('_ComposerLink', '_ComposerLink', '0', '0', 'metadata', 'field', '', null), ('_FeaturedInstrumentLink', '_FeaturedInstrumentLink', '0', '0', 'metadata', 'field', '', null), ('_BPMLink', '_BPMLink', '0', '0', 'metadata', 'field', '', null), ('_VolumeLink', '_VolumeLink', '0', '0', 'metadata', 'field', '', null), ('_ShowLink', '_ShowLink', '0', '0', 'metadata', 'field', '', null), ('_SceneLink', '_SceneLink', '0', '0', 'metadata', 'field', '', null), ('_TapeLink', '_TapeLink', '0', '0', 'metadata', 'field', '', null), ('_ShortIDLink', '_ShortIDLink', '0', '0', 'metadata', 'field', '', null), ('_MoodLink', '_MoodLink', '0', '0', 'metadata', 'field', '', null), ('_UsageLink', '_UsageLink', '0', '0', 'metadata', 'field', '', null), ('CueInTime', 'CueInTime', '1', '0', 'cuesheet', 'field', '', null), ('CueOutTime', 'CueOutTime', '1', '0', 'cuesheet', 'field', '', null);
COMMIT;

-- ----------------------------
--  Table structure for `comm_cart_items`
-- ----------------------------
CREATE TABLE `comm_cart_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NULL DEFAULT NULL,
  `cart_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `Duration` time DEFAULT NULL,
  `CDTitle` varchar(100) DEFAULT NULL,
  `Description` varchar(1000) DEFAULT NULL,
  `Composer` varchar(255) DEFAULT NULL,
  `FilePath` varchar(255) DEFAULT NULL,
  `FileType` varchar(4) DEFAULT NULL,
  `Picture` mediumblob,
  `Waveform` mediumblob,
  `track_id` int(11) DEFAULT NULL,
  `TrackTitle` varchar(255) DEFAULT NULL,
  `Volume` varchar(100) DEFAULT NULL,
  `Library` varchar(150) DEFAULT NULL,
  `Manufacturer` varchar(150) DEFAULT NULL,
  `Publisher` varchar(255) DEFAULT NULL,
  `Source` varchar(62) DEFAULT NULL,
  `Category` varchar(62) DEFAULT NULL,
  `Version` varchar(31) DEFAULT NULL,
  `_WaveformLink` int(11) DEFAULT NULL,
  `_PictureLink` int(11) DEFAULT NULL,
  `db_id` int(11) DEFAULT NULL,
  `Picture_Hash` varchar(50) DEFAULT NULL,
  `Waveform_Hash` varchar(50) DEFAULT NULL,
  `Track` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cart_id` (`cart_id`),
  KEY `track_id` (`track_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `comm_carts`
-- ----------------------------
CREATE TABLE `comm_carts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `users_id` int(11) NOT NULL,
  `date_created` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `users_id` (`users_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `comm_clearances`
-- ----------------------------
CREATE TABLE `comm_clearances` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `position` float DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `children_category` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `definition` text COLLATE utf8_unicode_ci,
  `parent_clearance` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_clearances_on_parent_id_and_position` (`parent_id`,`position`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `comm_markets`
-- ----------------------------
CREATE TABLE `comm_markets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position` float DEFAULT NULL,
  `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `definition` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `region_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `comm_order_items`
-- ----------------------------
CREATE TABLE `comm_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NULL DEFAULT NULL,
  `order_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `Duration` time DEFAULT NULL,
  `CDTitle` varchar(100) DEFAULT NULL,
  `Description` varchar(1000) DEFAULT NULL,
  `Composer` varchar(255) DEFAULT NULL,
  `FilePath` varchar(255) DEFAULT NULL,
  `FileType` varchar(4) DEFAULT NULL,
  `Picture` mediumblob,
  `Waveform` mediumblob,
  `track_id` int(11) DEFAULT NULL,
  `TrackTitle` varchar(255) DEFAULT NULL,
  `Volume` varchar(100) DEFAULT NULL,
  `Library` varchar(150) DEFAULT NULL,
  `Manufacturer` varchar(150) DEFAULT NULL,
  `Publisher` varchar(255) DEFAULT NULL,
  `Source` varchar(62) DEFAULT NULL,
  `Category` varchar(62) DEFAULT NULL,
  `Version` varchar(31) DEFAULT NULL,
  `_WaveformLink` int(11) DEFAULT NULL,
  `_PictureLink` int(11) DEFAULT NULL,
  `db_id` int(11) DEFAULT NULL,
  `Picture_Hash` varchar(50) DEFAULT NULL,
  `Waveform_Hash` varchar(50) DEFAULT NULL,
  `Track` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cart_id` (`order_id`),
  KEY `track_id` (`track_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `comm_payment_methods`
-- ----------------------------
CREATE TABLE `comm_payment_methods` (
  `id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `comm_payments`
-- ----------------------------
CREATE TABLE `comm_payments` (
  `id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `comm_rate_card_custom_clearances`
-- ----------------------------
CREATE TABLE `comm_rate_card_custom_clearances` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position` float DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `definition` text COLLATE utf8_unicode_ci,
  `factor` float DEFAULT NULL,
  `value` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `index_clearances_on_parent_id_and_position` (`position`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `comm_rate_card_custom_durations`
-- ----------------------------
CREATE TABLE `comm_rate_card_custom_durations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position` float DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `duration` float DEFAULT NULL,
  `duration_unit` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
  `definition` text COLLATE utf8_unicode_ci,
  `factor` float DEFAULT NULL,
  `value` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `index_clearances_on_parent_id_and_position` (`position`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `comm_rate_card_custom_prod_types`
-- ----------------------------
CREATE TABLE `comm_rate_card_custom_prod_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position` float DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `definition` text COLLATE utf8_unicode_ci,
  `factor` float DEFAULT NULL,
  `value` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `index_clearances_on_parent_id_and_position` (`position`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `comm_rate_card_custom_territories`
-- ----------------------------
CREATE TABLE `comm_rate_card_custom_territories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `position` float DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `definition` text COLLATE utf8_unicode_ci,
  `factor` float DEFAULT NULL,
  `value` decimal(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `index_clearances_on_parent_id_and_position` (`position`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `comm_rate_card_presets`
-- ----------------------------
CREATE TABLE `comm_rate_card_presets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sales_person_users_id` int(11) NOT NULL,
  `users_id` int(11) NOT NULL,
  `rate_info` text NOT NULL,
  `rate_matrix_key_id` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `users_id` (`users_id`),
  KEY `rate_matrix_key_id` (`rate_matrix_key_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `comm_rates`
-- ----------------------------
CREATE TABLE `comm_rates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `clearance_id` int(11) DEFAULT NULL,
  `market_id` int(11) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `license_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_rates_on_clearance_id_and_market_id` (`clearance_id`,`market_id`),
  KEY `index_rates_on_market_id` (`market_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `countries`
-- ----------------------------
CREATE TABLE `countries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `iso` varchar(3) NOT NULL,
  `country_name` varchar(75) NOT NULL,
  `custom_order` int(11) DEFAULT NULL,
  `iso_two_chars` varchar(2) DEFAULT NULL,
  `regional_site_title` varchar(255) DEFAULT NULL,
  `regional_site_description` text,
  `regional_site_keywords` text,
  `regional_reg_emails` text,
  `regional_help_url` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_countries_iso` (`iso`),
  KEY `country_name` (`country_name`),
  KEY `custom_order` (`custom_order`)
) ENGINE=MyISAM AUTO_INCREMENT=311 DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `countries`
-- ----------------------------
BEGIN;
INSERT INTO `countries` VALUES ('65', 'abw', 'Aruba', null, 'aw', null, null, null, null, null), ('66', 'afg', 'Afghanistan', null, 'af', null, null, null, null, null), ('67', 'ago', 'Angola', null, 'ao', null, null, null, null, null), ('68', 'aia', 'Anguilla', null, 'ai', null, null, null, null, null), ('69', 'ala', 'Aaland Islands', null, 'ax', null, null, null, null, null), ('70', 'alb', 'Albania', null, 'al', null, null, null, null, null), ('71', 'and', 'Andorra', null, 'ad', null, null, null, null, null), ('72', 'ant', 'Netherlands Antilles', null, null, null, null, null, null, null), ('73', 'are', 'United Arab Emirates', null, 'ae', null, null, null, null, null), ('74', 'arg', 'Argentina', null, 'ar', null, null, null, null, null), ('75', 'arm', 'Armenia', null, 'am', null, null, null, null, null), ('76', 'asm', 'American Samoa', null, 'as', null, null, null, null, null), ('77', 'ata', 'Antarctica', null, 'aq', null, null, null, null, null), ('78', 'atf', 'French Southern Territories', null, 'tf', null, null, null, null, null), ('79', 'atg', 'Antigua and Barbuda', null, 'ag', null, null, null, null, null), ('80', 'aus', 'Australia', null, 'au', null, null, null, null, null), ('81', 'aut', 'Austria', null, 'at', null, null, null, null, null), ('82', 'aze', 'Azerbaijan', null, 'az', null, null, null, null, null), ('83', 'bdi', 'Burundi', null, 'bi', null, null, null, null, null), ('84', 'bel', 'Belgium', null, 'be', null, null, null, null, null), ('85', 'ben', 'Benin', null, 'bj', null, null, null, null, null), ('86', 'bfa', 'Burkina Faso', null, 'bf', null, null, null, null, null), ('87', 'bgd', 'Bangladesh', null, 'bd', null, null, null, null, null), ('88', 'bgr', 'Bulgaria', null, 'bg', null, null, null, null, null), ('89', 'bhr', 'Bahrain', null, 'bh', null, null, null, null, null), ('90', 'bhs', 'Bahamas', null, 'bs', null, null, null, null, null), ('91', 'bih', 'Bosnia and Herzegovina', null, 'ba', null, null, null, null, null), ('92', 'blm', 'Saint Barthélemy', null, 'bl', null, null, null, null, null), ('93', 'blr', 'Belarus', null, 'by', null, null, null, null, null), ('94', 'blz', 'Belize', null, 'bz', null, null, null, null, null), ('95', 'bmu', 'Bermuda', null, 'bm', null, null, null, null, null), ('96', 'bol', 'Bolivia, Plurinational State of', null, 'bo', null, null, null, null, null), ('97', 'bra', 'Brazil', null, 'br', null, null, null, null, null), ('98', 'brb', 'Barbados', null, 'bb', null, null, null, null, null), ('99', 'brn', 'Brunei Darussalam', null, 'bn', null, null, null, null, null), ('100', 'btn', 'Bhutan', null, 'bt', null, null, null, null, null), ('101', 'bvt', 'Bouvet Island', null, 'bv', null, null, null, null, null), ('102', 'bwa', 'Botswana', null, 'bw', null, null, null, null, null), ('103', 'caf', 'Central African Republic', null, 'cf', null, null, null, null, null), ('104', 'can', 'Canada', null, 'ca', null, null, null, null, null), ('105', 'cck', 'Cocos (Keeling) Islands', null, 'cc', null, null, null, null, null), ('106', 'che', 'Switzerland', null, 'ch', null, null, null, null, null), ('107', 'chl', 'Chile', null, 'cl', null, null, null, null, null), ('108', 'chn', 'China', null, 'cn', null, null, null, null, null), ('109', 'civ', 'Côte d\'Ivoire', null, 'ci', null, null, null, null, null), ('110', 'cmr', 'Cameroon', null, 'cm', null, null, null, null, null), ('111', 'cod', 'Congo, the Democratic Republic of the', null, 'cd', null, null, null, null, null), ('112', 'cog', 'Congo', null, 'cg', null, null, null, null, null), ('113', 'cok', 'Cook Islands', null, 'ck', null, null, null, null, null), ('114', 'col', 'Colombia', null, 'co', null, null, null, null, null), ('115', 'com', 'Comoros', null, 'km', null, null, null, null, null), ('116', 'cpv', 'Cape Verde', null, 'cv', null, null, null, null, null), ('117', 'cri', 'Costa Rica', null, 'cr', null, null, null, null, null), ('118', 'cub', 'Cuba', null, 'cu', null, null, null, null, null), ('119', 'cxr', 'Christmas Island', null, 'cx', null, null, null, null, null), ('120', 'cym', 'Cayman Islands', null, 'ky', null, null, null, null, null), ('121', 'cyp', 'Cyprus', null, 'cy', null, null, null, null, null), ('122', 'cze', 'Czech Republic', null, 'cz', null, null, null, null, null), ('123', 'deu', 'Germany', null, 'de', null, null, null, null, null), ('124', 'dji', 'Djibouti', null, 'dj', null, null, null, null, null), ('125', 'dma', 'Dominica', null, 'dm', null, null, null, null, null), ('126', 'dnk', 'Denmark', null, 'dk', null, null, null, null, null), ('127', 'dom', 'Dominican Republic', null, 'do', null, null, null, null, null), ('128', 'dza', 'Algeria', null, 'dz', null, null, null, null, null), ('129', 'ecu', 'Ecuador', null, 'ec', null, null, null, null, null), ('130', 'egy', 'Egypt', null, 'eg', null, null, null, null, null), ('131', 'eri', 'Eritrea', null, 'er', null, null, null, null, null), ('132', 'esh', 'Western Sahara', null, 'eh', null, null, null, null, null), ('133', 'esp', 'Spain', null, 'es', null, null, null, null, null), ('134', 'est', 'Estonia', null, 'ee', null, null, null, null, null), ('135', 'eth', 'Ethiopia', null, 'et', null, null, null, null, null), ('136', 'fin', 'Finland', null, 'fi', null, null, null, null, null), ('137', 'fji', 'Fiji', null, 'fj', null, null, null, null, null), ('138', 'flk', 'Falkland Islands (Malvinas)', null, 'fk', null, null, null, null, null), ('139', 'fra', 'France', null, 'fr', null, null, null, null, null), ('140', 'fro', 'Faroe Islands', null, 'fo', null, null, null, null, null), ('141', 'fsm', 'Micronesia, Federated States of', null, 'fm', null, null, null, null, null), ('142', 'gab', 'Gabon', null, 'ga', null, null, null, null, null), ('143', 'gbr', 'United Kingdom', '2', 'gb', null, null, null, null, null), ('144', 'geo', 'Georgia', null, 'ge', null, null, null, null, null), ('145', 'ggy', 'Guernsey', null, 'gg', null, null, null, null, null), ('146', 'gha', 'Ghana', null, 'gh', null, null, null, null, null), ('147', 'gib', 'Gibraltar', null, 'gi', null, null, null, null, null), ('148', 'gin', 'Guinea', null, 'gn', null, null, null, null, null), ('149', 'glp', 'Guadeloupe', null, 'gp', null, null, null, null, null), ('150', 'gmb', 'Gambia', null, 'gm', null, null, null, null, null), ('151', 'gnb', 'Guinea-Bissau', null, 'gw', null, null, null, null, null), ('152', 'gnq', 'Equatorial Guinea', null, 'gq', null, null, null, null, null), ('153', 'grc', 'Greece', null, 'gr', null, null, null, null, null), ('154', 'grd', 'Grenada', null, 'gd', null, null, null, null, null), ('155', 'grl', 'Greenland', null, 'gl', null, null, null, null, null), ('156', 'gtm', 'Guatemala', null, 'gt', null, null, null, null, null), ('157', 'guf', 'French Guiana', null, 'gf', null, null, null, null, null), ('158', 'gum', 'Guam', null, 'gu', null, null, null, null, null), ('159', 'guy', 'Guyana', null, 'gy', null, null, null, null, null), ('160', 'hkg', 'Hong Kong', null, 'hk', null, null, null, null, null), ('161', 'hmd', 'Heard Island and McDonald Islands', null, 'hm', null, null, null, null, null), ('162', 'hnd', 'Honduras', null, 'hn', null, null, null, null, null), ('163', 'hrv', 'Croatia', null, 'hr', null, null, null, null, null), ('164', 'hti', 'Haiti', null, 'ht', null, null, null, null, null), ('165', 'hun', 'Hungary', null, 'hu', null, null, null, null, null), ('166', 'idn', 'Indonesia', null, 'id', null, null, null, null, null), ('167', 'imn', 'Isle of Man', null, 'im', null, null, null, null, null), ('168', 'ind', 'India', null, 'in', null, null, null, null, null), ('169', 'iot', 'British Indian Ocean Territory', null, 'io', null, null, null, null, null), ('170', 'irl', 'Ireland', null, 'ie', null, null, null, null, null), ('171', 'irn', 'Iran, Islamic Republic of', null, 'ir', null, null, null, null, null), ('172', 'irq', 'Iraq', null, 'iq', null, null, null, null, null), ('173', 'isl', 'Iceland', null, 'is', null, null, null, null, null), ('174', 'isr', 'Israel', null, 'il', null, null, null, null, null), ('175', 'ita', 'Italy', null, 'it', null, null, null, null, null), ('176', 'jam', 'Jamaica', null, 'jm', null, null, null, null, null), ('177', 'jey', 'Jersey', null, 'je', null, null, null, null, null), ('178', 'jor', 'Jordan', null, 'jo', null, null, null, null, null), ('179', 'jpn', 'Japan', null, 'jp', null, null, null, null, null), ('180', 'kaz', 'Kazakhstan', null, 'kz', null, null, null, null, null), ('181', 'ken', 'Kenya', null, 'ke', null, null, null, null, null), ('182', 'kgz', 'Kyrgyzstan', null, 'kg', null, null, null, null, null), ('183', 'khm', 'Cambodia', null, 'kh', null, null, null, null, null), ('184', 'kir', 'Kiribati', null, 'ki', null, null, null, null, null), ('185', 'kna', 'Saint Kitts and Nevis', null, 'kn', null, null, null, null, null), ('186', 'kor', 'Korea, Republic of', null, 'kr', null, null, null, null, null), ('187', 'kwt', 'Kuwait', null, 'kw', null, null, null, null, null), ('188', 'lao', 'Lao People\'s Democratic Republic', null, 'la', null, null, null, null, null), ('189', 'lbn', 'Lebanon', null, 'lb', null, null, null, null, null), ('190', 'lbr', 'Liberia', null, 'lr', null, null, null, null, null), ('191', 'lby', 'Libyan Arab Jamahiriya', null, 'ly', null, null, null, null, null), ('192', 'lca', 'Saint Lucia', null, 'lc', null, null, null, null, null), ('193', 'lie', 'Liechtenstein', null, 'li', null, null, null, null, null), ('194', 'lka', 'Sri Lanka', null, 'lk', null, null, null, null, null), ('195', 'lso', 'Lesotho', null, 'ls', null, null, null, null, null), ('196', 'ltu', 'Lithuania', null, 'lt', null, null, null, null, null), ('197', 'lux', 'Luxembourg', null, 'lu', null, null, null, null, null), ('198', 'lva', 'Latvia', null, 'lv', null, null, null, null, null), ('199', 'mac', 'Macao', null, 'mo', null, null, null, null, null), ('200', 'maf', 'Saint Martin (French part)', null, 'mf', null, null, null, null, null), ('201', 'mar', 'Morocco', null, 'ma', null, null, null, null, null), ('202', 'mco', 'Monaco', null, 'mc', null, null, null, null, null), ('203', 'mda', 'Moldova, Republic of', null, 'md', null, null, null, null, null), ('204', 'mdg', 'Madagascar', null, 'mg', null, null, null, null, null), ('205', 'mdv', 'Maldives', null, 'mv', null, null, null, null, null), ('206', 'mex', 'Mexico', null, 'mx', null, null, null, null, null), ('207', 'mhl', 'Marshall Islands', null, 'mh', null, null, null, null, null), ('208', 'mkd', 'Macedonia, the former Yugoslav Republic of', null, 'mk', null, null, null, null, null), ('209', 'mli', 'Mali', null, 'ml', null, null, null, null, null), ('210', 'mlt', 'Malta', null, 'mt', null, null, null, null, null), ('211', 'mmr', 'Myanmar', null, 'mm', null, null, null, null, null), ('212', 'mne', 'Montenegro', null, 'me', null, null, null, null, null), ('213', 'mng', 'Mongolia', null, 'mn', null, null, null, null, null), ('214', 'mnp', 'Northern Mariana Islands', null, 'mp', null, null, null, null, null), ('215', 'moz', 'Mozambique', null, 'mz', null, null, null, null, null), ('216', 'mrt', 'Mauritania', null, 'mr', null, null, null, null, null), ('217', 'msr', 'Montserrat', null, 'ms', null, null, null, null, null), ('218', 'mtq', 'Martinique', null, 'mq', null, null, null, null, null), ('219', 'mus', 'Mauritius', null, 'mu', null, null, null, null, null), ('220', 'mwi', 'Malawi', null, 'mw', null, null, null, null, null), ('221', 'mys', 'Malaysia', null, 'my', null, null, null, null, null), ('222', 'myt', 'Mayotte', null, 'yt', null, null, null, null, null), ('223', 'nam', 'Namibia', null, 'na', null, null, null, null, null), ('224', 'ncl', 'New Caledonia', null, 'nc', null, null, null, null, null), ('225', 'ner', 'Niger', null, 'ne', null, null, null, null, null), ('226', 'nfk', 'Norfolk Island', null, 'nf', null, null, null, null, null), ('227', 'nga', 'Nigeria', null, 'ng', null, null, null, null, null), ('228', 'nic', 'Nicaragua', null, 'ni', null, null, null, null, null), ('229', 'niu', 'Niue', null, 'nu', null, null, null, null, null), ('230', 'nld', 'Netherlands', null, 'nl', null, null, null, null, null), ('231', 'nor', 'Norway', null, 'no', null, null, null, null, null), ('232', 'npl', 'Nepal', null, 'np', null, null, null, null, null), ('233', 'nru', 'Nauru', null, 'nr', null, null, null, null, null), ('234', 'nzl', 'New Zealand', null, 'nz', null, null, null, null, null), ('235', 'omn', 'Oman', null, 'om', null, null, null, null, null), ('236', 'pak', 'Pakistan', null, 'pk', null, null, null, null, null), ('237', 'pan', 'Panama', null, 'pa', null, null, null, null, null), ('238', 'pcn', 'Pitcairn', null, 'pn', null, null, null, null, null), ('239', 'per', 'Peru', null, 'pe', null, null, null, null, null), ('240', 'phl', 'Philippines', null, 'ph', null, null, null, null, null), ('241', 'plw', 'Palau', null, 'pw', null, null, null, null, null), ('242', 'png', 'Papua New Guinea', null, 'pg', null, null, null, null, null), ('243', 'pol', 'Poland', null, 'pl', null, null, null, null, null), ('244', 'pri', 'Puerto Rico', null, 'pr', null, null, null, null, null), ('245', 'prk', 'Korea, Democratic People\'s Republic of', null, 'kp', null, null, null, null, null), ('246', 'prt', 'Portugal', null, 'pt', null, null, null, null, null), ('247', 'pry', 'Paraguay', null, 'py', null, null, null, null, null), ('248', 'pse', 'Palestinian Territory, Occupied', null, 'ps', null, null, null, null, null), ('249', 'pyf', 'French Polynesia', null, 'pf', null, null, null, null, null), ('250', 'qat', 'Qatar', null, 'qa', null, null, null, null, null), ('251', 'reu', 'Réunion', null, 're', null, null, null, null, null), ('252', 'rou', 'Romania', null, 'ro', null, null, null, null, null), ('253', 'rus', 'Russian Federation', null, 'ru', null, null, null, null, null), ('254', 'rwa', 'Rwanda', null, 'rw', null, null, null, null, null), ('255', 'sau', 'Saudi Arabia', null, 'sa', null, null, null, null, null), ('256', 'sdn', 'Sudan', null, 'sd', null, null, null, null, null), ('257', 'sen', 'Senegal', null, 'sn', null, null, null, null, null), ('258', 'sgp', 'Singapore', null, 'sg', null, null, null, null, null), ('259', 'sgs', 'South Georgia and the South Sandwich Islands', null, 'gs', null, null, null, null, null), ('260', 'shn', 'Saint Helena, Ascension and Tristan da Cunha', null, 'sh', null, null, null, null, null), ('261', 'sjm', 'Svalbard and Jan Mayen', null, 'sj', null, null, null, null, null), ('262', 'slb', 'Solomon Islands', null, 'sb', null, null, null, null, null), ('263', 'sle', 'Sierra Leone', null, 'sl', null, null, null, null, null), ('264', 'slv', 'El Salvador', null, 'sv', null, null, null, null, null), ('265', 'smr', 'San Marino', null, 'sm', null, null, null, null, null), ('266', 'som', 'Somalia', null, 'so', null, null, null, null, null), ('267', 'spm', 'Saint Pierre and Miquelon', null, 'pm', null, null, null, null, null), ('268', 'srb', 'Serbia', null, 'rs', null, null, null, null, null), ('269', 'stp', 'Sao Tome and Principe', null, 'st', null, null, null, null, null), ('270', 'sur', 'Suriname', null, 'sr', null, null, null, null, null), ('271', 'svk', 'Slovakia', null, 'sk', null, null, null, null, null), ('272', 'svn', 'Slovenia', null, 'si', null, null, null, null, null), ('273', 'swe', 'Sweden', null, 'se', null, null, null, null, null), ('274', 'swz', 'Swaziland', null, 'sz', null, null, null, null, null), ('275', 'syc', 'Seychelles', null, 'sc', null, null, null, null, null), ('276', 'syr', 'Syrian Arab Republic', null, 'sy', null, null, null, null, null), ('277', 'tca', 'Turks and Caicos Islands', null, 'tc', null, null, null, null, null), ('278', 'tcd', 'Chad', null, 'td', null, null, null, null, null), ('279', 'tgo', 'Togo', null, 'tg', null, null, null, null, null), ('280', 'tha', 'Thailand', null, 'th', null, null, null, null, null), ('281', 'tjk', 'Tajikistan', null, 'tj', null, null, null, null, null), ('282', 'tkl', 'Tokelau', null, 'tk', null, null, null, null, null), ('283', 'tkm', 'Turkmenistan', null, 'tm', null, null, null, null, null), ('284', 'tls', 'Timor-Leste', null, 'tl', null, null, null, null, null), ('285', 'ton', 'Tonga', null, 'to', null, null, null, null, null), ('286', 'tto', 'Trinidad and Tobago', null, 'tt', null, null, null, null, null), ('287', 'tun', 'Tunisia', null, 'tn', null, null, null, null, null), ('288', 'tur', 'Turkey', null, 'tr', null, null, null, null, null), ('289', 'tuv', 'Tuvalu', null, 'tv', null, null, null, null, null), ('290', 'twn', 'Taiwan, Province of China', null, 'tw', null, null, null, null, null), ('291', 'tza', 'Tanzania, United Republic of', null, 'tz', null, null, null, null, null), ('292', 'uga', 'Uganda', null, 'ug', null, null, null, null, null), ('293', 'ukr', 'Ukraine', null, 'ua', null, null, null, null, null), ('294', 'umi', 'United States Minor Outlying Islands', null, 'um', null, null, null, null, null), ('295', 'ury', 'Uruguay', null, 'uy', null, null, null, null, null), ('296', 'usa', 'United States', '1', 'us', null, null, null, null, null), ('297', 'uzb', 'Uzbekistan', null, 'uz', null, null, null, null, null), ('298', 'vat', 'Holy See (Vatican City State)', null, 'va', null, null, null, null, null), ('299', 'vct', 'Saint Vincent and the Grenadines', null, 'vc', null, null, null, null, null), ('300', 'ven', 'Venezuela, Bolivarian Republic of', null, 've', null, null, null, null, null), ('301', 'vgb', 'Virgin Islands, British', null, 'vg', null, null, null, null, null), ('302', 'vir', 'Virgin Islands, U.S.', null, 'vi', null, null, null, null, null), ('303', 'vnm', 'Viet Nam', null, 'vn', null, null, null, null, null), ('304', 'vut', 'Vanuatu', null, 'vu', null, null, null, null, null), ('305', 'wlf', 'Wallis and Futuna', null, 'wf', null, null, null, null, null), ('306', 'wsm', 'Samoa', null, 'ws', null, null, null, null, null), ('307', 'yem', 'Yemen', null, 'ye', null, null, null, null, null), ('308', 'zaf', 'South Africa', null, 'za', null, null, null, null, null), ('309', 'zmb', 'Zambia', null, 'zm', null, null, null, null, null), ('310', 'zwe', 'Zimbabwe', null, 'zw', null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `databases`
-- ----------------------------
CREATE TABLE `databases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `schema` varchar(30) NOT NULL DEFAULT '',
  `version` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `version_min` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `display` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `proxy_id` int(11) DEFAULT '0',
  `perm_columns` varchar(255) NOT NULL DEFAULT '["Library","CDTitle","Filename"]',
  `group_columns` varchar(255) NOT NULL DEFAULT '["Library","CDTitle","TrackTitle"]',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='List of known Soundminer library databases.';

-- ----------------------------
--  Records of `databases`
-- ----------------------------
BEGIN;
INSERT INTO `databases` VALUES ('1', '615_music', 'soundminer4', '1', '1', '615_music', '0', '0', '1', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]'), ('2', 'Discovery', 'soundminer4', '1', '1', 'Discovery', '0', '0', '2', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]'), ('3', 'ImportedFresh', 'soundminer4', '2', '2', 'ImportedFresh', '5', '0', '3', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]'), ('4', 'mwright', 'soundminer4', '1', '1', 'mwright', '0', '0', '4', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]'), ('5', 'mwright2', 'soundminer4', '1', '1', 'mwright2', '0', '0', '5', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]'), ('6', 'nonstop', 'soundminer4', '1', '1', 'nonstop', '0', '0', '6', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]'), ('7', 'musicminer', 'soundminerHD', '2', '2', 'musicminer', '0', '0', '7', '[\"Library\",\"CDTitle\",\"Filename\"]', '[\"Library\",\"CDTitle\",\"TrackTitle\"]');
COMMIT;

-- ----------------------------
--  Table structure for `folder_states`
-- ----------------------------
CREATE TABLE `folder_states` (
  `user_id` int(11) NOT NULL,
  `type` enum('section','group','shared','folder','cuesheet','playlist') NOT NULL DEFAULT 'folder' COMMENT 'Indicates which table, `folders`, `cuesheets`, or `playlists` that `id` is associated with.',
  `id` int(11) NOT NULL,
  `state` enum('open','closed','hidden') NOT NULL,
  PRIMARY KEY (`user_id`,`type`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Many to one relationship between users and folder state (i.e';

-- ----------------------------
--  Records of `folder_states`
-- ----------------------------
BEGIN;
INSERT INTO `folder_states` VALUES ('1', 'folder', '1', 'open'), ('2', 'folder', '2', 'open'), ('3', 'folder', '3', 'open'), ('32387', 'folder', '10', 'open'), ('32387', 'folder', '11', 'open'), ('0', 'folder', '12', 'open'), ('32388', 'folder', '13', 'open'), ('32388', 'folder', '14', 'open'), ('1', 'playlist', '1', 'open'), ('32389', 'folder', '15', 'open'), ('32389', 'folder', '16', 'open'), ('32390', 'folder', '17', 'open'), ('32390', 'folder', '18', 'open'), ('1', 'folder', '19', 'open');
COMMIT;

-- ----------------------------
--  Table structure for `folders`
-- ----------------------------
CREATE TABLE `folders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner_id` int(11) DEFAULT NULL COMMENT 'Owner ID: > 0 = user_id, < 0 = group_id.',
  `type` enum('private','inbox','published','shared') DEFAULT NULL COMMENT 'Internal flag which determines project tree placement and handling.',
  `o_access` set('read','add','modify','delete','root') DEFAULT NULL COMMENT 'Bit flags that control owner''s access to this content.',
  `s_access` set('read','add','modify','delete','root') DEFAULT NULL COMMENT 'Bit flags that control other user''s access to shared content.',
  `root_id` int(11) NOT NULL COMMENT 'Root folder with owner and access settings.',
  `folder_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Parent folder containing this folder.',
  `path` varchar(1000) NOT NULL COMMENT 'Tree hierachy path.',
  `name` varchar(128) NOT NULL DEFAULT 'Folder' COMMENT 'Name of this folder as it appears in parent project folder.',
  `created` datetime NOT NULL COMMENT 'Timestamp of the original creation of row.',
  `updated` datetime NOT NULL COMMENT 'Timestamp of the last modification of row.',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Deleted flag.',
  `updated_by` int(11) NOT NULL DEFAULT '0' COMMENT 'User ID of user making the last modification of row.',
  `orig_id` int(11) DEFAULT NULL COMMENT 'Transient field used when doing complex copy operations.',
  `section` enum('playlists','cuesheets') DEFAULT 'playlists',
  `cuesheet_title` varchar(100) DEFAULT NULL,
  `cuesheet_company` varchar(100) DEFAULT NULL,
  `cuesheet_description` varchar(250) DEFAULT NULL,
  `cuesheet_network` varchar(100) DEFAULT NULL,
  `cuesheet_address1` varchar(100) DEFAULT NULL,
  `cuesheet_address2` varchar(100) DEFAULT NULL,
  `cuesheet_city` varchar(50) DEFAULT NULL,
  `cuesheet_region` varchar(50) DEFAULT NULL,
  `cuesheet_postal` varchar(25) DEFAULT NULL,
  `cuesheet_country_iso` varchar(3) DEFAULT NULL,
  `cuesheet_phone` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `folder_id` (`folder_id`),
  KEY `path_index` (`path`(333)),
  KEY `orig_id_index` (`orig_id`),
  KEY `updated_by` (`updated_by`),
  KEY `root_id` (`root_id`),
  KEY `owner_id` (`owner_id`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `folders`
-- ----------------------------
BEGIN;
INSERT INTO `folders` VALUES ('1', '1', 'private', 'read,add,modify,delete', '', '1', '0', '/Admin:1/', 'Admin', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('2', '2', 'private', 'read,add,modify,delete', '', '2', '0', '/Guest:2/', 'Guest', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('3', '3', 'private', 'read,add,modify,delete', '', '3', '0', '/Default:3/', 'Default', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('4', '1', 'inbox', 'read,delete', 'add', '4', '0', '/Admin:1/', 'Inbox', '2012-07-05 06:02:15', '2012-07-05 06:02:15', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('5', '2', 'inbox', 'read,delete', 'add', '5', '0', '/Guest:2/', 'Inbox', '2012-07-05 06:02:15', '2012-07-05 06:02:15', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('6', '3', 'inbox', 'read,delete', 'add', '6', '0', '/Default:3/', 'Inbox', '2012-07-05 06:02:15', '2012-07-05 06:02:15', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('7', '1', 'published', 'read,add,modify,delete', 'read', '7', '0', '/Admin:1/', 'Published', '2012-07-05 06:02:15', '2012-07-05 06:02:15', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('8', '2', 'published', 'read,add,modify,delete', 'read', '8', '0', '/Guest:2/', 'Published', '2012-07-05 06:02:15', '2012-07-05 06:02:15', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('9', '3', 'published', 'read,add,modify,delete', 'read', '9', '0', '/Default:3/', 'Published', '2012-07-05 06:02:15', '2012-07-05 06:02:15', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('10', '32387', 'private', 'read,add,modify,delete', '', '10', '0', '/mwright:32387/', 'mwright', '2013-05-05 23:50:53', '2013-05-05 23:50:53', '0', '32387', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('11', '32387', 'inbox', 'read,delete', 'add', '11', '0', '/Inbox:32387/', 'Inbox', '2013-05-05 23:51:06', '2013-05-05 23:51:06', '0', '32387', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('12', '-1', 'private', 'read,add,modify,delete', '', '12', '0', '/New Group:-1/', 'New Group', '2013-05-09 06:33:22', '2013-05-09 06:33:22', '0', '0', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('13', '32388', 'private', 'read,add,modify,delete', '', '13', '0', '/mwright2:32388/', 'mwright2', '2013-05-09 06:44:32', '2013-05-09 06:44:32', '0', '32388', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('14', '32388', 'inbox', 'read,delete', 'add', '14', '0', '/Inbox:32388/', 'Inbox', '2013-05-09 06:45:15', '2013-05-09 06:45:15', '0', '32388', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('15', '32389', 'private', 'read,add,modify,delete', '', '15', '0', '/Whole Track:32389/', 'Whole Track', '2013-12-10 23:39:48', '2013-12-10 23:39:48', '0', '32389', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('16', '32389', 'inbox', 'read,delete', 'add', '16', '0', '/Inbox:32389/', 'Inbox', '2013-12-10 23:40:27', '2013-12-10 23:40:27', '0', '32389', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('17', '32390', 'private', 'read,add,modify,delete', '', '17', '0', '/Whole Track - NIO:32390/', 'Whole Track - NIO', '2014-01-04 23:54:57', '2014-01-04 23:54:57', '0', '32390', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('18', '32390', 'inbox', 'read,delete', 'add', '18', '0', '/Inbox:32390/', 'Inbox', '2014-01-04 23:56:58', '2014-01-04 23:56:58', '0', '32390', null, 'playlists', null, null, null, null, null, null, null, null, null, null, null), ('19', '1', 'private', 'read,add,modify,delete', '', '19', '0', '/Cuesheets:1/', 'Cuesheets', '2014-04-21 03:19:20', '2014-04-21 03:19:20', '0', '1', null, 'cuesheets', null, null, null, null, null, null, null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `groups`
-- ----------------------------
CREATE TABLE `groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '0',
  `notes` varchar(255) NOT NULL,
  `settings_id` int(11) NOT NULL COMMENT 'Group''s settings.',
  `folder_id` int(11) NOT NULL COMMENT 'Root folder of group''s shared project content.',
  PRIMARY KEY (`id`),
  KEY `user_id` (`name`),
  KEY `folder_index` (`folder_id`,`id`),
  KEY `settings_id` (`settings_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `help`
-- ----------------------------
CREATE TABLE `help` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique help page identifier.',
  `date_created` datetime NOT NULL,
  `sequence` int(11) NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL COMMENT 'Displayable topic title.',
  `content` text NOT NULL COMMENT 'Help topic content.',
  PRIMARY KEY (`id`),
  FULLTEXT KEY `search` (`title`,`content`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `history`
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
--  Table structure for `hosts`
-- ----------------------------
CREATE TABLE `hosts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` varchar(64) NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index` (`ip`,`name`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `hosts`
-- ----------------------------
BEGIN;
INSERT INTO `hosts` VALUES ('1', '127.0.0.1', '127.0.0.1'), ('2', '24.150.32.91', '24.150.32.91'), ('3', '174.113.18.10', '174.113.18.10');
COMMIT;

-- ----------------------------
--  Table structure for `html_site_customizations`
-- ----------------------------
CREATE TABLE `html_site_customizations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `login_head` text COMMENT 'Custom HTML to insert at end of <head></head>.',
  `login_body1` text COMMENT 'Custom HTML to insert at start of <body></body>.',
  `login_body2` text COMMENT 'Custom HTML to insert at end of <body></body>.',
  `main_head` text COMMENT 'Custom HTML to insert at end of <head></head>.',
  `main_body1` text COMMENT 'Custom HTML to insert at start of <body></body>.',
  `main_body2` text COMMENT 'Custom HTML to insert at end of <body></body>.',
  `admin_head` text COMMENT 'Custom HTML to insert at end of <head></head>.',
  `admin_body1` text COMMENT 'Custom HTML to insert at start of <body></body>.',
  `admin_body2` text COMMENT 'Custom HTML to insert at end of <body></body>.',
  `widgets_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `widgets_id` (`widgets_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `log`
-- ----------------------------
CREATE TABLE `log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique sequence event ID.',
  `time` datetime NOT NULL COMMENT 'Date/time of event occurrence.',
  `event` enum('login','logout','search','audition','download','error') NOT NULL COMMENT 'The event that occurred and indicates which log tables contain further info.',
  `user_id` int(11) DEFAULT NULL COMMENT 'ID of logged in user causing the event.',
  `group_id` int(11) DEFAULT NULL COMMENT 'ID of logged in user''s group causing the event.',
  `role_id` int(11) DEFAULT NULL COMMENT 'ID of logged in user''s role causing the event.',
  `host_id` int(11) NOT NULL COMMENT 'ID of client machine accessing the server during the event.',
  `browser_id` int(11) NOT NULL DEFAULT '1' COMMENT 'ID of client browser accessing the server during the event.',
  `ctrl_name` varchar(15) DEFAULT NULL,
  `ctrl_related_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_event_index` (`user_id`,`event`),
  KEY `idx_log_time` (`time`),
  KEY `idx_log_host` (`host_id`),
  KEY `idx_log_browser` (`browser_id`),
  KEY `idx_onepages_stats` (`ctrl_name`,`ctrl_related_id`),
  KEY `group_id` (`group_id`),
  KEY `role_id` (`role_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `log`
-- ----------------------------
BEGIN;
INSERT INTO `log` VALUES ('1', '2014-04-21 03:03:23', 'login', '1', '1', null, '1', '1', null, null), ('2', '2014-04-21 03:10:22', 'logout', '1', '1', null, '1', '1', null, null), ('3', '2014-04-21 03:10:22', 'login', '1', '1', null, '1', '1', null, null), ('4', '2014-04-21 03:22:57', 'login', '1', null, null, '1', '1', null, null), ('5', '2014-04-21 03:23:18', 'search', '1', null, null, '1', '1', null, null), ('6', '2014-04-21 10:36:20', 'login', '1', null, null, '1', '1', null, null), ('7', '2014-04-21 11:57:40', 'login', '1', null, null, '1', '1', null, null), ('8', '2016-02-09 14:04:30', 'login', '1', null, null, '2', '2', null, null), ('9', '2016-02-09 14:09:47', 'login', '1', null, null, '3', '3', null, null), ('10', '2016-02-09 14:10:09', 'logout', '1', null, null, '3', '3', null, null), ('11', '2016-02-09 14:11:04', 'login', '1', null, null, '3', '3', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `log_downloads`
-- ----------------------------
CREATE TABLE `log_downloads` (
  `log_id` int(11) NOT NULL,
  `asset_id` int(11) NOT NULL,
  `db_id` int(11) NOT NULL,
  `track_id` int(11) NOT NULL,
  `file_path` varchar(3000) NOT NULL,
  `file_size` int(10) unsigned NOT NULL,
  `file_type` varchar(255) NOT NULL,
  `completed` tinyint(1) NOT NULL,
  PRIMARY KEY (`log_id`),
  KEY `asset_id` (`asset_id`),
  KEY `file_type` (`file_type`),
  KEY `file_path` (`file_path`(333)),
  KEY `file_size` (`file_size`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `log_logins`
-- ----------------------------
CREATE TABLE `log_logins` (
  `log_id` int(11) NOT NULL DEFAULT '0',
  `login_id` int(11) DEFAULT NULL COMMENT 'The matching logout, for logins, or login, for logouts, event ID.',
  `method` enum('user','auto') NOT NULL COMMENT 'The method or reason for the login or logout.',
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `log_logins`
-- ----------------------------
BEGIN;
INSERT INTO `log_logins` VALUES ('1', '2', 'user'), ('2', '1', 'user'), ('3', null, 'user'), ('4', null, 'user'), ('6', null, 'user'), ('7', null, 'user'), ('8', null, 'user'), ('9', '10', 'user'), ('10', '9', 'user'), ('11', null, 'user');
COMMIT;

-- ----------------------------
--  Table structure for `log_searches`
-- ----------------------------
CREATE TABLE `log_searches` (
  `log_id` int(10) unsigned NOT NULL,
  `query_id` int(11) NOT NULL DEFAULT '0',
  `lock` tinyint(1) NOT NULL,
  `text` text NOT NULL,
  `total` int(11) NOT NULL,
  PRIMARY KEY (`log_id`),
  KEY `query_id` (`query_id`),
  KEY `total` (`total`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `log_searches`
-- ----------------------------
BEGIN;
INSERT INTO `log_searches` VALUES ('5', '1', '0', 'guitar', '0');
COMMIT;

-- ----------------------------
--  Table structure for `media`
-- ----------------------------
CREATE TABLE `media` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `title` varchar(255) NOT NULL DEFAULT '',
  `description` text,
  `file_size` decimal(10,2) NOT NULL,
  `mime_type` varchar(25) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `users_id` int(11) NOT NULL,
  `extension` varchar(25) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `mimes`
-- ----------------------------
CREATE TABLE `mimes` (
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` varchar(30) NOT NULL DEFAULT '',
  `subtype` varchar(30) NOT NULL,
  `ext` varchar(255) NOT NULL DEFAULT '',
  `mime` varchar(255) NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `mimes`
-- ----------------------------
BEGIN;
INSERT INTO `mimes` VALUES ('MPEG Video', 'video', 'mpeg', 'mpg,mpeg,mpe', 'video/mpeg'), ('QuickTime Video', 'video', 'quicktime', 'mov,qt', 'video/quicktime'), ('Microsoft Video', 'video', 'x-msvideo', 'avi', 'video/x-msvideo'), ('WAV Audio', 'audio', 'x-wav', 'wav', 'audio/x-wav'), ('AIFF Audio', 'audio', 'x-aiff', 'aiff', 'audio/x-aiff'), ('MIDI Audio', 'audio', 'x-midi', 'mid', 'audio/x-midi'), ('MP3 Audio', 'audio', 'mpeg', 'mp3', 'audio/mpeg'), ('MP2 Audio', 'audio', 'mpeg', 'mp2', 'audio/mpeg'), ('MP1 Audio', 'audio', 'mpeg', 'mp1', 'audio/mpeg'), ('MP4 Audio', 'audio', 'mp4', 'mp4,mpg4', 'audio/mp4'), ('MP4 Video', 'video', 'mp4', 'mp4,mpg4', 'video/mp4');
COMMIT;

-- ----------------------------
--  Table structure for `perms`
-- ----------------------------
CREATE TABLE `perms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_reports` tinyint(1) DEFAULT NULL,
  `select_db` tinyint(1) DEFAULT NULL,
  `file_exts` tinyint(1) DEFAULT NULL,
  `email_playlists` tinyint(1) DEFAULT NULL COMMENT 'Allow user to email playlists with auditionable links.',
  `group_add` tinyint(1) DEFAULT NULL,
  `group_remove` tinyint(1) DEFAULT NULL,
  `group_reports` tinyint(1) DEFAULT NULL,
  `group_permissions` tinyint(1) DEFAULT NULL,
  `admin_home` tinyint(1) DEFAULT NULL,
  `admin_users` tinyint(1) DEFAULT NULL,
  `admin_reports` tinyint(1) DEFAULT NULL,
  `admin_columns` tinyint(1) DEFAULT NULL,
  `admin_databases` tinyint(1) DEFAULT NULL,
  `admin_site` tinyint(1) DEFAULT NULL,
  `assets` longtext,
  `columns` longtext,
  `sort_tracks` longtext,
  `sort_albums` longtext,
  `opt_home` enum('enabled','disabled') DEFAULT NULL COMMENT 'Enable/disable the home screen functionality and interface.',
  `opt_view` enum('user','auto','fixed') DEFAULT NULL COMMENT 'Allow user to choose results view or force ''auto'' or ''fixed'' view.',
  `opt_vista` enum('user','albums','mixed','tracks') DEFAULT NULL COMMENT 'Allow user to choose results vista or force ''albums'', ''mixed'', or ''tracks'' vista.',
  `opt_browse` enum('user','show','hide') DEFAULT NULL COMMENT 'Allow user to show/hide metabrowser or force ''show'' or ''hide''.',
  `opt_grouping` enum('user','off','on') DEFAULT NULL COMMENT 'Allow user to turn grouping on/off for result tracks or force ''on'' or ''off''.',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `playlists`
-- ----------------------------
CREATE TABLE `playlists` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `root_id` int(11) NOT NULL COMMENT 'Root folder with owner and access settings.',
  `folder_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Parent folder containing this playlist. NULL = deleted.',
  `path` varchar(1000) NOT NULL COMMENT 'Tree hierachy path.',
  `type` enum('playlist','cuesheet') NOT NULL DEFAULT 'playlist' COMMENT 'The list type as created by the user.',
  `name` varchar(128) NOT NULL DEFAULT 'Playlist' COMMENT 'Name of this playlist as it appears to the user.',
  `title` varchar(200) DEFAULT NULL,
  `episode` varchar(128) DEFAULT NULL COMMENT 'Episode title if part of a series.',
  `episode_no` varchar(12) DEFAULT NULL COMMENT 'Episode number if part of a series.',
  `production_no` varchar(100) DEFAULT NULL,
  `airdate` date DEFAULT NULL COMMENT 'Original or estimated airdate.',
  `length` time DEFAULT NULL COMMENT 'Normal run time of program or length of film.',
  `program_type` varchar(100) DEFAULT NULL,
  `version_type` varchar(100) DEFAULT NULL,
  `job_no` varchar(100) DEFAULT NULL,
  `station` varchar(128) DEFAULT NULL COMMENT 'Network station associated with the program.',
  `producer` varchar(128) DEFAULT NULL COMMENT 'Producer of the film or program.',
  `distributor` varchar(128) DEFAULT NULL COMMENT 'Distributor of the film or program.',
  `director` varchar(128) DEFAULT NULL COMMENT 'Director of the film or program.',
  `isci` varchar(14) DEFAULT NULL COMMENT 'Commercial spot ISCI Code or Ad-ID.',
  `contact` varchar(1000) DEFAULT NULL COMMENT 'Person or company, with address and contact info., who produced the program, prepared, or should be contacted regarding, the cuesheet.',
  `contact_type` enum('contact','prepared','produced') NOT NULL DEFAULT 'contact' COMMENT 'The entity which the `contact` field refers.',
  `notes` varchar(10000) DEFAULT NULL COMMENT 'User''s notes attached to this cuesheet.',
  `created` datetime NOT NULL COMMENT 'Timestamp of the original creation of row.',
  `updated` datetime NOT NULL COMMENT 'Timestamp of the last modification of row.',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Deleted flag.',
  `updated_by` int(11) NOT NULL DEFAULT '0' COMMENT 'User ID of user making the last modification of row.',
  `orig_id` int(11) DEFAULT NULL COMMENT 'Transient field used when doing complex copy operations.',
  `status` tinyint(1) DEFAULT NULL,
  `status_id` int(4) DEFAULT NULL,
  `rate_id` int(4) DEFAULT NULL,
  `clearance_id` int(4) DEFAULT NULL,
  `market_id` int(4) DEFAULT NULL,
  `broadcast` tinyint(4) DEFAULT NULL,
  `creator_id` varchar(25) DEFAULT NULL,
  `production_company` varchar(100) DEFAULT NULL,
  `category` varchar(25) DEFAULT NULL,
  `production_year` varchar(4) DEFAULT NULL,
  `animation_indicator` tinyint(4) DEFAULT '0',
  `master_cuesheet_indicator` tinyint(4) DEFAULT '0',
  `public` tinyint(4) NOT NULL DEFAULT '0',
  `originator_first_name` varchar(50) DEFAULT NULL,
  `originator_last_name` varchar(50) DEFAULT NULL,
  `originator_email` varchar(255) DEFAULT NULL,
  `originator_user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `folder_id_index` (`folder_id`),
  KEY `path_index` (`path`(333)),
  KEY `orig_id_index` (`orig_id`),
  KEY `updated_by` (`updated_by`),
  KEY `deleted` (`deleted`),
  KEY `title` (`title`),
  KEY `root_id` (`root_id`),
  KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `proxies`
-- ----------------------------
CREATE TABLE `proxies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `db_id` int(11) NOT NULL,
  `display` varchar(255) NOT NULL,
  `mime_name` varchar(255) NOT NULL DEFAULT 'From Metadata' COMMENT '''From Metadata'' = use type given in `metadata` table row',
  `channel_layout` enum('From Metadata','','L/R','L/C/R','L/R/S','L/R/Ls/Rs','L/C/R/S','L/C/R/Ls/Rs/LFE','A1/A2/A3/A4/A5/A6') NOT NULL DEFAULT 'From Metadata',
  `asset_path_prefix` varchar(255) NOT NULL,
  `proxy_path_prefix` varchar(255) NOT NULL,
  `asset_file_prefix` varchar(255) NOT NULL,
  `proxy_file_prefix` varchar(255) NOT NULL DEFAULT '',
  `asset_file_suffix` varchar(255) NOT NULL DEFAULT '',
  `proxy_file_suffix` varchar(255) NOT NULL DEFAULT '',
  `is_asset` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `db_id` (`db_id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `proxies`
-- ----------------------------
BEGIN;
INSERT INTO `proxies` VALUES ('1', '1', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1'), ('2', '2', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1'), ('3', '3', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1'), ('4', '4', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1'), ('5', '5', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1'), ('6', '6', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1'), ('7', '7', 'Asset', 'From Metadata', 'From Metadata', '', '', '', '', '', '', '1');
COMMIT;

-- ----------------------------
--  Table structure for `queries`
-- ----------------------------
CREATE TABLE `queries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `databases` varchar(512) NOT NULL,
  `query` varchar(16383) NOT NULL,
  `query_trim` varchar(500) DEFAULT NULL,
  `databases_trim` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `databases_trim` (`databases_trim`),
  KEY `query_trim` (`query_trim`(333))
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `queries`
-- ----------------------------
BEGIN;
INSERT INTO `queries` VALUES ('1', '', 'guitar', 'guitar', '');
COMMIT;

-- ----------------------------
--  Table structure for `quick_search_options`
-- ----------------------------
CREATE TABLE `quick_search_options` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `search_criteria` varchar(1000) DEFAULT NULL,
  `description` varchar(1000) NOT NULL,
  `playlist_id` int(11) DEFAULT NULL,
  `widgets_id` int(11) DEFAULT NULL,
  `img` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `quick_search_options`
-- ----------------------------
BEGIN;
INSERT INTO `quick_search_options` VALUES ('1', '2016-02-09 14:12:35', 'rock', 'rock', '0', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `reports`
-- ----------------------------
CREATE TABLE `reports` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(64) NOT NULL DEFAULT '' COMMENT 'Report title and template name.',
  `description` varchar(255) NOT NULL DEFAULT '' COMMENT 'Report description.',
  `time` enum('cday','cweek','cmonth','cyear','lday','lweek','lmonth','lyear','all','custom') NOT NULL DEFAULT 'cday' COMMENT 'Time period covered by report.',
  `begin` datetime DEFAULT '0000-00-00 00:00:00' COMMENT 'Start of custom time period.',
  `end` datetime DEFAULT '0000-00-00 00:00:00' COMMENT 'End of custom time period.',
  `users` int(11) NOT NULL DEFAULT '0' COMMENT 'User or -group ID to include in report.',
  `tables` varchar(10000) NOT NULL DEFAULT '' COMMENT 'JSON array of structures representing report tables.',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `reports`
-- ----------------------------
BEGIN;
INSERT INTO `reports` VALUES ('1', 'Activity Log', 'Chronological log of a user\'s activity.', 'all', null, null, '0', '[{\"type\":\"detail\",\"title\":\"\",\"events\":[\"login\",\"logout\",\"search\",\"audition\",\"download\",\"error\"],\"groups\":[[\"Users\",\"user\",\"asc\",0,0],[null,\"date\",\"asc\",0,0]],\"fields\":[[null,\"time\",\"\",1,0,0,0,0],[null,\"event\",\"\",2,0,0,0,0],[null,\"info\",\"\",3,0,0,0,0]],\"limit\":null,\"grand\":null}]'), ('2', 'Search Summary', '', 'all', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '[{\"type\":\"summary\",\"title\":\"Most Popular\",\"events\":[\"search\"],\"limit\":null,\"grand\":true,\"groups\":[[\"Database(s)\",\"s_databases\",null,true,true],[\"Search Query\",\"s_query\",null,true,true]],\"fields\":[[\"# Searches\",\"id\",\"desc\",null,\"count\"],[\"# Users\",\"user\",\"desc\",null,\"dcount\"],[\"Min Found\",\"s_total\",null,null,\"min\"],[\"Max Found\",\"s_total\",null,null,\"max\"],[\"Avg Found\",\"s_total\",null,null,\"avg\"]]},{\"type\":\"summary\",\"title\":\"Fewest Results\",\"events\":[\"search\"],\"limit\":null,\"grand\":true,\"groups\":[[\"Database(s)\",\"s_databases\",null,true,true],[\"Search Query\",\"s_query\",null,true,true]],\"fields\":[[\"# Searches\",\"id\",\"desc\",2,\"count\"],[\"# Users\",\"user\",\"desc\",3,\"dcount\"],[\"Min Found\",\"s_total\",\"asc\",0,\"min\"],[\"Max Found\",\"s_total\",null,null,\"max\"],[\"Avg Found\",\"s_total\",\"asc\",1,\"avg\"]]},{\"type\":\"detail\",\"title\":\"Failed Searches By User\",\"events\":[\"search\"],\"limit\":null,\"grand\":true,\"groups\":[[\"User\",\"user\",\"asc\",false,false]],\"fields\":[[\"Time\",\"datetime\",\"asc\",null,false,false,false,false],[\"Database(s)\",\"s_databases\",\"asc\",null,false,false,false,false],[\"Query\",\"s_query\",\"asc\",null,false,false,false,false],[\"Results\",\"s_total\",\"asc\",2,false,false,false,false]],\"where\":[[\"s_total\",\"eq\",\"0\"]]}]'), ('3', 'Download Summary', '', 'all', null, null, '0', '[{\"type\":\"summary\",\"title\":\"Top Categories\",\"events\":[\"download\"],\"groups\":[[\"Category\",\"a_category\",\"\",1,1]],\"fields\":[[\"# Downloads\",\"id\",\"desc\",null,\"count\"],[\"# Assets\",\"a_id\",\"desc\",null,\"dcount\"]],\"where\":[],\"limit\":null,\"grand\":null},{\"type\":\"summary\",\"title\":\"Top Libraries\",\"events\":[\"download\"],\"groups\":[[\"Library\",\"a_library\",\"\",1,1]],\"fields\":[[\"# Downloads\",\"id\",\"desc\",null,\"count\"],[\"# Assets\",\"a_id\",\"desc\",null,\"dcount\"]],\"where\":[],\"limit\":null,\"grand\":null},{\"type\":\"summary\",\"title\":\"Top Albums\",\"events\":[\"download\"],\"groups\":[[\"Album\",\"a_cdtitle\",\"\",1,1]],\"fields\":[[\"# Downloads\",\"id\",\"desc\",null,\"count\"],[\"# Assets\",\"a_id\",\"desc\",null,\"dcount\"]],\"where\":[],\"limit\":null,\"grand\":null},{\"type\":\"summary\",\"title\":\"Top Users\",\"events\":[\"download\"],\"groups\":[[\"User\",\"user\",\"\",1,1]],\"fields\":[[\"# Downloads\",\"id\",\"desc\",null,\"count\"],[\"# Assets\",\"a_id\",\"desc\",null,\"dcount\"]],\"where\":[],\"limit\":null,\"grand\":null}]'), ('4', 'Download Log', 'Detailed log of downloads grouped by user.', 'all', null, null, '0', '[{\"type\":\"detail\",\"title\":\"\",\"events\":[\"download\"],\"groups\":[[\"User\",\"user\",\"asc\",0,1]],\"fields\":[[null,\"datetime\",\"asc\",null,0,0,0,0],[null,\"host_ip\",\"\",null,0,0,0,0],[null,\"a_library\",\"\",null,0,0,0,0],[null,\"a_cdtitle\",\"\",null,0,0,0,0],[\"Type\",\"d_filetype\",\"\",null,0,0,0,0],[null,\"d_filename\",\"\",null,0,0,0,0],[\"Size\",\"d_filebytes\",\"\",null,1,0,0,0]],\"limit\":null,\"grand\":null}]'), ('5', 'Browser Summary', '', 'all', null, null, '0', '[{\"type\":\"summary\",\"title\":\"Browsers\",\"events\":[\"login\",\"logout\",\"search\",\"audition\",\"download\",\"error\"],\"groups\":[[\"Browser\",\"b_full\",\"\",1,0]],\"fields\":[[\"# Users\",\"user\",\"desc\",null,\"dcount\"]],\"where\":[],\"limit\":null,\"grand\":1},{\"type\":\"summary\",\"title\":\"Platforms\",\"events\":[\"login\",\"logout\",\"search\",\"audition\",\"download\",\"error\"],\"groups\":[[null,\"b_platform\",\"\",1,0]],\"fields\":[[\"# Users\",\"user\",\"desc\",null,\"dcount\"]],\"where\":[],\"limit\":null,\"grand\":1}]'), ('38', 'All Activity', '', 'all', null, null, '0', '[{\"type\":\"detail\",\"title\":\"Activity\",\"events\":[\"login\",\"search\",\"audition\"],\"groups\":[[\"All Users\",\"id\",\"\",0,0]],\"fields\":[[\"ID\",\"id\",\"\",null,0,0,0,0],[\"Event\",\"event\",\"\",null,0,0,0,0]],\"where\":[],\"limit\":null,\"grand\":null}]');
COMMIT;

-- ----------------------------
--  Table structure for `roles`
-- ----------------------------
CREATE TABLE `roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `notes` varchar(255) NOT NULL,
  `settings_id` int(11) NOT NULL COMMENT 'Role''s settings.',
  PRIMARY KEY (`id`),
  KEY `settings_id` (`settings_id`),
  KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `roles`
-- ----------------------------
BEGIN;
INSERT INTO `roles` VALUES ('1', 'Administrator', 'Administrators get full access to all administrative functions, download rights to all assets, and the ability to view all metadata pertaining to an asset.', '4'), ('2', 'Supervisor', 'Supervisors have higher permissions than normal Guests or Users.  They can download any file from any library.  Created for Sales Reps. ', '5'), ('3', 'Superuser', '', '6'), ('4', 'User', '', '7'), ('5', 'Guest', '', '8');
COMMIT;

-- ----------------------------
--  Table structure for `schema`
-- ----------------------------
CREATE TABLE `schema` (
  `schema` varchar(30) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `db_ver` varchar(30) NOT NULL,
  `mm_ver` varchar(30) NOT NULL,
  `sm_ver` varchar(30) NOT NULL,
  `guid` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 MAX_ROWS=1;

-- ----------------------------
--  Records of `schema`
-- ----------------------------
BEGIN;
INSERT INTO `schema` VALUES ('mm_admin', '1.2.3.4', '1.3.2', '1.2.3', 'ca86403ce137102d952ad1bb33cc6aab');
COMMIT;

-- ----------------------------
--  Table structure for `search_topics_options`
-- ----------------------------
CREATE TABLE `search_topics_options` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `search_criteria` varchar(1000) DEFAULT NULL,
  `description` varchar(1000) NOT NULL,
  `playlist_id` int(11) DEFAULT NULL,
  `widgets_id` int(11) DEFAULT NULL,
  `sequence` int(11) DEFAULT NULL,
  `parent_title` varchar(100) DEFAULT NULL,
  `header_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `search_topics_options_headers`
-- ----------------------------
CREATE TABLE `search_topics_options_headers` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL DEFAULT '',
  `sequence` int(11) NOT NULL DEFAULT '0',
  `widgets_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `searches`
-- ----------------------------
CREATE TABLE `searches` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `root_id` int(11) NOT NULL COMMENT 'Root folder with owner and access settings.',
  `folder_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Parent folder containing this folder. NULL = deleted.',
  `path` varchar(1000) NOT NULL COMMENT 'Tree hierachy path. empty = deleted.',
  `name` varchar(128) NOT NULL COMMENT 'Name of this search as it appears in parent project folder.',
  `text` text NOT NULL,
  `created` datetime NOT NULL COMMENT 'Timestamp of the original creation of row.',
  `updated` datetime NOT NULL COMMENT 'Timestamp of the last modification of row.',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Deleted flag.',
  `updated_by` int(11) NOT NULL DEFAULT '0' COMMENT 'User ID of user making the last modification of row.',
  `orig_id` int(11) DEFAULT NULL COMMENT 'Transient field used when doing complex copy operations.',
  PRIMARY KEY (`id`),
  KEY `folder_id` (`folder_id`),
  KEY `path_index` (`path`(333)),
  KEY `orig_id_index` (`orig_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='User''s saved search queries';

-- ----------------------------
--  Table structure for `selective_search_groups`
-- ----------------------------
CREATE TABLE `selective_search_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `name` varchar(50) NOT NULL,
  `sequence` float DEFAULT NULL,
  `group_type` enum('or','and') DEFAULT NULL,
  `description` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `selective_search_groups`
-- ----------------------------
BEGIN;
INSERT INTO `selective_search_groups` VALUES ('1', null, 'Category', '1', 'and', null);
COMMIT;

-- ----------------------------
--  Table structure for `selective_search_options`
-- ----------------------------
CREATE TABLE `selective_search_options` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `search_criteria` varchar(250) DEFAULT NULL,
  `description` varchar(250) NOT NULL,
  `sequence` float DEFAULT NULL,
  `group_id` int(11) DEFAULT NULL,
  `batch_id` varchar(25) DEFAULT NULL,
  `search_criteria_exclude` varchar(250) DEFAULT NULL,
  `parent_title` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `selective_search_options`
-- ----------------------------
BEGIN;
INSERT INTO `selective_search_options` VALUES ('1', '2016-02-09 14:14:06', 'rock', 'Rock', '1', '1', null, '-rock', null);
COMMIT;

-- ----------------------------
--  Table structure for `sessions`
-- ----------------------------
CREATE TABLE `sessions` (
  `id` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `data` text CHARACTER SET latin1 NOT NULL,
  `touched` int(11) NOT NULL,
  `uid` int(11) DEFAULT NULL,
  `logout` tinyint(1) NOT NULL DEFAULT '0',
  `reason` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `uid_index` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sessions`
-- ----------------------------
BEGIN;
INSERT INTO `sessions` VALUES ('bvkh5pgb7srqe03rbuie45bcj0', '__session__|a:1:{s:9:\"is_public\";b:0;}login|a:1:{s:9:\"challenge\";s:32:\"80bfa87bb2c7f3bcc5d7f27edb059ee6\";}uid|i:1;m|a:1:{s:8:\"login_id\";i:11;}main|a:1:{s:9:\"challenge\";s:32:\"89566c496d5f7b7ba57eacc04a9b5dfd\";}content|a:0:{}HistoryModel|a:2:{s:6:\"_count\";i:1;s:5:\"_next\";i:1;}panel|a:1:{s:4:\"page\";i:0;}project|a:3:{s:5:\"fsync\";s:19:\"2016-02-09 14:21:11\";s:5:\"psync\";s:19:\"2016-02-09 14:21:11\";s:5:\"tsync\";s:19:\"2016-02-09 14:21:11\";}ProjectModel|a:4:{s:5:\"fsync\";s:19:\"2016-02-09 14:11:04\";s:5:\"psync\";s:19:\"2016-02-09 14:11:04\";s:5:\"tsync\";s:19:\"2016-02-09 14:11:04\";s:5:\"ssync\";s:19:\"2016-02-09 14:11:04\";}admin|a:1:{s:4:\"page\";s:7:\"suggest\";}', '1455045683', '1', '0', null), ('kp6l2urpmuerqbu1akpu9v9bb7', '__session__|a:1:{s:9:\"is_public\";b:0;}login|a:1:{s:9:\"challenge\";s:32:\"0bde001546be948ef5761821a7de9189\";}flash|a:0:{}uid|i:1;m|a:1:{s:8:\"login_id\";i:8;}main|a:1:{s:9:\"challenge\";s:32:\"b15b9cf6227720e5949c9b95b30fa92d\";}content|a:0:{}HistoryModel|a:2:{s:6:\"_count\";i:1;s:5:\"_next\";i:1;}panel|a:1:{s:4:\"page\";i:0;}project|a:3:{s:5:\"fsync\";s:19:\"2016-02-09 14:09:09\";s:5:\"psync\";s:19:\"2016-02-09 14:09:09\";s:5:\"tsync\";s:19:\"2016-02-09 14:09:09\";}ProjectModel|a:4:{s:5:\"fsync\";s:19:\"2016-02-09 14:04:30\";s:5:\"psync\";s:19:\"2016-02-09 14:04:30\";s:5:\"tsync\";s:19:\"2016-02-09 14:04:30\";s:5:\"ssync\";s:19:\"2016-02-09 14:04:30\";}admin|a:1:{s:4:\"page\";s:4:\"site\";}site|a:1:{s:4:\"page\";i:0;}', '1455045648', '1', '1', 'You were logged out because you logged in at another location.');
COMMIT;

-- ----------------------------
--  Records of `settings`
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
--  Table structure for `share`
-- ----------------------------
CREATE TABLE `share` (
  `name` varchar(255) NOT NULL COMMENT 'Unique shared memory key.',
  `value` varchar(20000) NOT NULL DEFAULT '' COMMENT 'Shared memory value.',
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='InnoDB, row locking, shared memory and semaphore table.';

-- ----------------------------
--  Table structure for `shared`
-- ----------------------------
CREATE TABLE `shared` (
  `user_id` int(11) NOT NULL COMMENT 'Viewing user ID.',
  `owner_id` int(11) NOT NULL COMMENT 'Sharing user ID.'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Links users to other user''s shared folders.';

-- ----------------------------
--  Records of `site`
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
--  Table structure for `static_search_options`
-- ----------------------------
CREATE TABLE `static_search_options` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `search_criteria` varchar(1000) DEFAULT NULL,
  `description` varchar(1000) NOT NULL,
  `category` varchar(25) DEFAULT NULL,
  `sequence` int(11) DEFAULT NULL,
  `tab_id` int(11) DEFAULT NULL,
  `widgets_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category` (`category`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `static_search_options`
-- ----------------------------
BEGIN;
INSERT INTO `static_search_options` VALUES ('1', '2016-02-09 14:12:51', 'rock', 'rock', null, '0', '0', null), ('2', '2016-02-09 14:13:18', 'rock', 'rock', null, '1', '1', null);
COMMIT;

-- ----------------------------
--  Table structure for `static_search_tabs`
-- ----------------------------
CREATE TABLE `static_search_tabs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `name` varchar(50) NOT NULL,
  `sequence` float DEFAULT NULL,
  `widgets_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `static_search_tabs`
-- ----------------------------
BEGIN;
INSERT INTO `static_search_tabs` VALUES ('1', null, 'Category', '1', null);
COMMIT;

-- ----------------------------
--  Table structure for `tracks`
-- ----------------------------
CREATE TABLE `tracks` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `root_id` int(11) NOT NULL COMMENT 'Root folder with owner and access settings.',
  `playlist_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Parent playlist containing this track. NULL = deleted.',
  `path` varchar(1000) DEFAULT '' COMMENT 'Tree hierachy path. empty = deleted.',
  `asset_id` int(11) NOT NULL COMMENT 'Entry in `assets` table that represents this track.',
  `db_id` int(11) DEFAULT NULL,
  `track_id` int(11) DEFAULT NULL,
  `ndx` int(11) NOT NULL COMMENT 'The sequence index of this track within the playlist.',
  `usage` varchar(32) NOT NULL COMMENT 'Standardized code indicating how the track was used.',
  `time` time NOT NULL COMMENT 'Duration of song usage within the work.',
  `created` datetime NOT NULL COMMENT 'Timestamp of the original creation of row.',
  `updated` datetime NOT NULL COMMENT 'Timestamp of the last modification of row.',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Deleted flag.',
  `updated_by` int(11) NOT NULL DEFAULT '0' COMMENT 'User ID of user making the last modification of row.',
  `orig_id` int(11) DEFAULT NULL COMMENT 'Transient field used when doing complex copy operations.',
  `CueInTime` varchar(30) DEFAULT NULL,
  `CueOutTime` varchar(30) DEFAULT NULL,
  `CueTime` varchar(30) DEFAULT NULL,
  `CuePublisher` text,
  `CueComposer` text,
  `CueUsage` varchar(250) DEFAULT NULL,
  `CueUpLoaded` int(5) DEFAULT NULL,
  `track_comments` text,
  PRIMARY KEY (`id`),
  KEY `asset_index` (`asset_id`),
  KEY `path_index` (`path`(333)),
  KEY `orig_id_index` (`orig_id`),
  KEY `playlist_index` (`playlist_id`),
  KEY `db_index` (`db_id`),
  KEY `track_id_x1` (`track_id`),
  KEY `ndx` (`ndx`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `users`
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
--  Table structure for `users_groups`
-- ----------------------------
CREATE TABLE `users_groups` (
  `user_id` int(11) NOT NULL COMMENT 'User ID.',
  `group_id` int(11) NOT NULL COMMENT 'Group ID.',
  `role_id` int(11) DEFAULT NULL COMMENT 'User''s role within the group.',
  PRIMARY KEY (`user_id`,`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `widgets`
-- ----------------------------
CREATE TABLE `widgets` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `key_code` varchar(50) NOT NULL,
  `json` text,
  `active` int(10) unsigned DEFAULT '1',
  `title` varchar(50) DEFAULT NULL,
  `widgets_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `key_code` (`key_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
--  Table structure for `widgets_roles`
-- ----------------------------
CREATE TABLE `widgets_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `widgets_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

