/*
 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 `assets`
-- ----------------------------
CREATE TABLE `assets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `db_id` int(11) DEFAULT NULL,
  `track_id` int(11) DEFAULT NULL,
  `asset_key` char(32) NOT NULL COMMENT 'Random md5 hash used for access security.',
  `Filename` varchar(255) NOT NULL,
  `Pathname` varchar(255) DEFAULT NULL,
  `FilePath` text,
  `Duration` varchar(20) DEFAULT NULL,
  `FileType` varchar(4) DEFAULT NULL,
  `CreationDate` date DEFAULT NULL,
  `ModificationDate` date DEFAULT NULL,
  `TrackTitle` varchar(255) DEFAULT NULL,
  `Composer` varchar(255) DEFAULT NULL,
  `Publisher` varchar(255) DEFAULT NULL,
  `TotalFrames` int(10) unsigned DEFAULT NULL,
  `EntryDate` double DEFAULT NULL,
  `Split` tinyint(1) unsigned DEFAULT NULL,
  `SplitChannels` tinyint(3) unsigned DEFAULT NULL,
  `SampleRate` int(5) unsigned DEFAULT NULL,
  `Channels` tinyint(3) unsigned DEFAULT NULL,
  `BitDepth` tinyint(3) unsigned DEFAULT NULL,
  `ChannelLayout` varchar(31) DEFAULT NULL,
  `_WaveformLink` int(10) unsigned DEFAULT NULL,
  `_PictureLink` int(10) unsigned DEFAULT NULL,
  `_UMID` varchar(64) DEFAULT NULL,
  `RecID` int(10) unsigned DEFAULT NULL,
  `Popularity` int(10) unsigned DEFAULT NULL,
  `Rating` int(10) unsigned DEFAULT NULL,
  `_FlatCategory` varchar(255) DEFAULT NULL,
  `Time` time DEFAULT NULL,
  `Volume` varchar(100) DEFAULT NULL,
  `Track` bigint(20) DEFAULT NULL,
  `Index` smallint(6) DEFAULT NULL,
  `_Dirty` smallint(6) DEFAULT NULL,
  `Lyrics` text,
  `Description` varchar(1000) DEFAULT NULL,
  `Source` varchar(62) DEFAULT NULL,
  `Category` varchar(62) DEFAULT NULL,
  `SubCategory` varchar(128) DEFAULT NULL,
  `FXName` varchar(128) DEFAULT NULL,
  `Notes` varchar(1000) DEFAULT NULL,
  `Show` varchar(62) DEFAULT NULL,
  `Library` varchar(150) DEFAULT NULL,
  `RecType` varchar(62) DEFAULT NULL,
  `ShortID` varchar(31) DEFAULT NULL,
  `LongID` varchar(128) DEFAULT NULL,
  `RecMedium` varchar(62) DEFAULT NULL,
  `Keywords` varchar(1000) DEFAULT NULL,
  `Location` varchar(128) DEFAULT NULL,
  `Microphone` varchar(62) DEFAULT NULL,
  `Arranger` varchar(128) DEFAULT NULL,
  `Conductor` varchar(128) DEFAULT NULL,
  `Performer` varchar(128) DEFAULT NULL,
  `BPM` varchar(31) DEFAULT NULL,
  `Key` varchar(15) DEFAULT NULL,
  `Manufacturer` varchar(150) DEFAULT NULL,
  `Designer` varchar(62) DEFAULT NULL,
  `CDTitle` varchar(100) DEFAULT NULL,
  `CDDescription` varchar(1000) DEFAULT NULL,
  `FeaturedInstrument` varchar(128) DEFAULT NULL,
  `Scene` varchar(31) DEFAULT NULL,
  `Take` varchar(31) DEFAULT NULL,
  `Tape` varchar(31) DEFAULT NULL,
  `Mood` varchar(128) DEFAULT NULL,
  `Version` varchar(62) DEFAULT NULL,
  `BWDescription` varchar(1000) DEFAULT NULL,
  `BWOriginator` varchar(62) DEFAULT NULL,
  `BWOriginatorRef` varchar(62) DEFAULT NULL,
  `BWTimeStamp` varchar(11) DEFAULT NULL,
  `BWTime` varchar(8) DEFAULT NULL,
  `BWDate` varchar(10) DEFAULT NULL,
  `smint_track_id` varchar(50) DEFAULT NULL,
  `spectral_external_key` varchar(50) DEFAULT NULL,
  `TouchedDate` double DEFAULT NULL,
  `Artist` varchar(255) DEFAULT NULL,
  `Usage` varchar(62) DEFAULT NULL,
  `TrackYear` varchar(31) DEFAULT NULL,
  `UserComments` varchar(255) DEFAULT NULL,
  `Tempo` varchar(62) DEFAULT NULL,
  `NewSource` varchar(128) DEFAULT NULL,
  `_smint_track_id` varchar(50) DEFAULT NULL,
  `JDNotes` varchar(1000) DEFAULT NULL,
  `ReleaseDate` date DEFAULT NULL,
  `cdndate` datetime DEFAULT NULL,
  `cdnstale` tinyint(4) DEFAULT NULL,
  `foxnewname` varchar(50) DEFAULT NULL,
  `ScannedDate` datetime DEFAULT NULL,
  `ISRC` varchar(16) DEFAULT NULL,
  `URL` varchar(255) DEFAULT NULL,
  `_PathnameLink` int(10) unsigned DEFAULT NULL,
  `_CategoryLink` int(10) unsigned DEFAULT NULL,
  `_ManufacturerLink` int(10) unsigned DEFAULT NULL,
  `_LibraryLink` int(10) unsigned DEFAULT NULL,
  `_DesignerLink` int(10) unsigned DEFAULT NULL,
  `_CDTitleLink` int(10) unsigned DEFAULT NULL,
  `_ComposerLink` int(10) unsigned DEFAULT NULL,
  `_FeaturedInstrumentLink` int(10) unsigned DEFAULT NULL,
  `_BPMLink` int(10) unsigned DEFAULT NULL,
  `_VolumeLink` int(10) unsigned DEFAULT NULL,
  `_ShowLink` int(10) unsigned DEFAULT NULL,
  `_SceneLink` int(10) unsigned DEFAULT NULL,
  `_TapeLink` int(10) unsigned DEFAULT NULL,
  `_ShortIDLink` int(10) unsigned DEFAULT NULL,
  `_MoodLink` int(10) unsigned DEFAULT NULL,
  `_UsageLink` int(10) unsigned DEFAULT NULL,
  `CueTime` varchar(255) DEFAULT NULL,
  `CueInTime` varchar(255) DEFAULT NULL,
  `CueOutTime` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `db_id_track_id_index` (`db_id`,`track_id`),
  KEY `RecID` (`RecID`),
  KEY `track_id` (`track_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  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_orders`
-- ----------------------------
CREATE TABLE `comm_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` datetime DEFAULT NULL,
  `users_id` int(11) DEFAULT NULL,
  `cart_id` int(11) DEFAULT NULL,
  `sales_person_users_id` int(11) DEFAULT NULL,
  `sales_person_name` varchar(100) DEFAULT NULL,
  `clearance` varchar(50) DEFAULT NULL,
  `territory` varchar(50) DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL,
  `tax` decimal(10,2) DEFAULT NULL,
  `gateway_response_raw` text,
  `status` varchar(25) NOT NULL DEFAULT 'pending',
  `approved` tinyint(4) NOT NULL DEFAULT '0',
  `payment_method` varchar(25) NOT NULL,
  `customer_notes` tinytext,
  `sales_notes` text,
  `rate_header_1` varchar(200) DEFAULT NULL,
  `rate_header_2` varchar(200) DEFAULT NULL,
  `rate_header_3` varchar(200) DEFAULT NULL,
  `rate_header_4` varchar(200) DEFAULT NULL,
  `rate_label_1` varchar(200) DEFAULT NULL,
  `rate_value_1` varchar(200) DEFAULT NULL,
  `rate_label_2` varchar(200) DEFAULT NULL,
  `rate_value_2` varchar(200) DEFAULT NULL,
  `rate_label_3` varchar(200) DEFAULT NULL,
  `rate_value_3` varchar(200) DEFAULT NULL,
  `rate_label_4` varchar(200) DEFAULT NULL,
  `rate_value_4` varchar(200) DEFAULT NULL,
  `order_tracking_info` varchar(50) DEFAULT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `address1` varchar(255) DEFAULT NULL,
  `address2` varchar(255) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `region` varchar(50) DEFAULT NULL,
  `postal_code` varchar(30) DEFAULT NULL,
  `phone` varchar(32) DEFAULT NULL,
  `phone_fax` varchar(32) DEFAULT NULL,
  `notes` text,
  `series_film_title` varchar(100) DEFAULT NULL,
  `episode_spot_title` varchar(100) DEFAULT NULL,
  `station` varchar(100) DEFAULT NULL,
  `producer` varchar(100) DEFAULT NULL,
  `episode` varchar(100) DEFAULT NULL,
  `air_date` varchar(100) DEFAULT NULL,
  `studio` varchar(100) DEFAULT NULL,
  `credit_name_on_card` varchar(100) DEFAULT NULL,
  `credit_type` varchar(4) DEFAULT NULL,
  `credit_exp_month` int(11) DEFAULT NULL,
  `credit_exp_year` int(11) DEFAULT NULL,
  `credit_card_last_four` int(11) DEFAULT NULL,
  `company` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `job_title` varchar(50) DEFAULT NULL,
  `phone_cell` varchar(32) DEFAULT NULL,
  `country_iso` varchar(3) DEFAULT NULL,
  `rate_matrix_key_id` varchar(25) DEFAULT NULL,
  `rate_label_custom_1` varchar(50) DEFAULT NULL,
  `rate_label_custom_2` varchar(50) DEFAULT NULL,
  `rate_label_custom_3` varchar(50) DEFAULT NULL,
  `rate_label_custom_4` varchar(50) DEFAULT NULL,
  `rate_value_custom_1` float DEFAULT NULL,
  `rate_value_custom_2` float DEFAULT NULL,
  `rate_value_custom_3` float DEFAULT NULL,
  `rate_value_custom_4` float DEFAULT NULL,
  PRIMARY KEY (`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 `cookies`
-- ----------------------------
CREATE TABLE `cookies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hash` char(32) NOT NULL DEFAULT '',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Manages "remember me" cookies.';

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

-- ----------------------------
--  Table structure for `history`
-- ----------------------------
CREATE TABLE `history` (
  `user_id` int(11) NOT NULL DEFAULT '0',
  `level` int(10) unsigned NOT NULL DEFAULT '0',
  `kind` enum('home','search','mod') NOT NULL DEFAULT 'home',
  `lock` tinyint(1) NOT NULL DEFAULT '0',
  `text` text CHARACTER SET latin1 NOT NULL,
  `ftext` text NOT NULL,
  `s_src_type` enum('db','special','folder','playlist','smart','cuesheet') NOT NULL,
  `s_src_id` int(11) NOT NULL,
  `s_result_vista` enum('albums','mixed','tracks') NOT NULL,
  `s_result_nondown` tinyint(1) NOT NULL,
  `s_track_columns` text NOT NULL,
  `s_browse_show` tinyint(1) NOT NULL,
  `s_browse_columns` text NOT NULL,
  `s_track_order` varchar(255) NOT NULL,
  `s_track_index` int(11) NOT NULL,
  `s_track_limit` int(11) NOT NULL,
  `s_track_grouping` enum('off','on') NOT NULL,
  `s_track_view` enum('auto','fixed') NOT NULL,
  `public_session_id` varchar(40) NOT NULL DEFAULT '',
  PRIMARY KEY (`user_id`,`level`,`public_session_id`),
  KEY `level_index` (`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='History stack of user queries';

-- ----------------------------
--  Records of `history`
-- ----------------------------
BEGIN;
INSERT INTO `history` VALUES ('1', '0', 'home', '0', '', '', 'db', '0', 'albums', '0', '', '0', '', '', '0', '0', 'off', 'auto', '');
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 `onepages`
-- ----------------------------
CREATE TABLE `onepages` (
  `id` varchar(255) NOT NULL,
  `user_id` int(11) NOT NULL,
  `playlist_id` int(11) NOT NULL,
  `orig_playlist_id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `columns` varchar(255) NOT NULL,
  `download` tinyint(1) NOT NULL DEFAULT '0',
  `password` varchar(50) DEFAULT NULL,
  `expires` datetime DEFAULT 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.',
  `sort_order_rename` tinyint(4) DEFAULT NULL,
  `general_notes` text,
  `id_incremental` int(11) NOT NULL AUTO_INCREMENT,
  `pitch_display` tinyint(4) NOT NULL DEFAULT '0',
  `pitch_type` varchar(25) DEFAULT NULL,
  `pitch_performer_name` varchar(100) DEFAULT NULL,
  `pitch_purpose` varchar(25) DEFAULT NULL,
  `pitch_method` varchar(25) DEFAULT NULL,
  `pitch_status` varchar(25) DEFAULT NULL,
  `pitch_to` varchar(100) DEFAULT NULL,
  `pitch_contact_role` varchar(50) DEFAULT NULL,
  `pitch_notes` text,
  `register_with_external_app` tinyint(4) DEFAULT '0',
  `password_required` tinyint(4) DEFAULT '0',
  `is_public` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_incremental`),
  UNIQUE KEY `id` (`id`),
  KEY `user_id` (`user_id`),
  KEY `expires` (`expires`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

-- ----------------------------
--  Table structure for `settings`
-- ----------------------------
CREATE TABLE `settings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `p_admin_users` tinyint(1) DEFAULT NULL COMMENT 'Permit administration of users.',
  `p_admin_reports` tinyint(1) DEFAULT NULL COMMENT 'Permit administration of reports.',
  `p_admin_site` tinyint(1) DEFAULT NULL COMMENT 'Permit administration of the site''s design, style, and options.',
  `p_admin_library` tinyint(1) DEFAULT NULL COMMENT 'Permit administration of databases, assets, and metadata.',
  `p_admin_system` tinyint(1) DEFAULT NULL COMMENT 'Permit administration of the system.',
  `p_assets` longtext COMMENT 'JSON structure of asset permissions.',
  `p_columns` longtext COMMENT 'JSON structure of column permissions.',
  `p_proxies` longtext COMMENT 'JSON structure of proxy permissions.',
  `u_sort_tracks` tinyint(1) DEFAULT NULL COMMENT 'User can change sort order of track results.',
  `u_sort_albums` tinyint(1) DEFAULT NULL COMMENT 'User can change sort order of ablums.',
  `u_src_type` tinyint(1) DEFAULT NULL COMMENT 'User can change source type.',
  `u_src_id` tinyint(1) DEFAULT NULL COMMENT 'User can change soure ID.',
  `u_result_vista` tinyint(1) DEFAULT NULL COMMENT 'User can change the results view.',
  `u_result_nondown` tinyint(1) DEFAULT NULL COMMENT 'User can change hide non-downloadable results.',
  `u_track_columns` tinyint(1) DEFAULT NULL COMMENT 'User can change track result columns.',
  `u_track_order` tinyint(1) DEFAULT NULL COMMENT 'User can change track result order.',
  `u_track_limit` tinyint(1) DEFAULT NULL COMMENT 'User can change track result page limit.',
  `u_track_grouping` tinyint(1) DEFAULT NULL COMMENT 'User can change track result grouping.',
  `u_track_view` tinyint(1) DEFAULT NULL COMMENT 'User can change track result view.',
  `u_browse_show` tinyint(1) DEFAULT NULL COMMENT 'User can change metabrowser visibility.',
  `u_browse_columns` tinyint(1) DEFAULT NULL COMMENT 'User can change metabrowser columns.',
  `u_project_show` tinyint(1) DEFAULT NULL COMMENT 'User can change project panel visibility.',
  `u_project_width` tinyint(1) DEFAULT NULL COMMENT 'User can change project panel width.',
  `u_download_zip` tinyint(1) DEFAULT NULL COMMENT 'User can change download method setting.',
  `u_download_flatten` tinyint(1) DEFAULT NULL COMMENT 'User can change download flat setting.',
  `u_wdgts` tinyint(1) DEFAULT NULL COMMENT 'User can change widgets structure.',
  `u_emailable` tinyint(1) DEFAULT NULL COMMENT 'User email playlists.',
  `u_home` tinyint(1) DEFAULT NULL COMMENT 'User can see home screen.',
  `s_sort_tracks` longtext COMMENT 'Sort order of track results.',
  `s_sort_albums` longtext COMMENT 'Sort order of album results.',
  `s_src_type` enum('db','special','folder','playlist','smart','cuesheet') DEFAULT NULL COMMENT 'Source type.',
  `s_src_id` int(11) DEFAULT NULL COMMENT 'Source ID: 0: all, >0:  db_id, <0: -folder_id',
  `s_result_vista` enum('albums','mixed','tracks') DEFAULT NULL COMMENT 'Results layout.',
  `s_result_nondown` tinyint(1) DEFAULT NULL COMMENT 'Hide non-downloadable results.',
  `s_track_columns` text COMMENT 'Track result columns.',
  `s_track_order` varchar(255) DEFAULT NULL COMMENT 'Track result order.',
  `s_track_limit` int(11) DEFAULT NULL COMMENT 'Track result page limit.',
  `s_track_grouping` enum('off','on') DEFAULT NULL COMMENT 'Track result grouping.',
  `s_track_view` enum('auto','fixed') DEFAULT NULL COMMENT 'Track result view.',
  `s_browse_show` enum('hide','show') DEFAULT NULL COMMENT 'Metabrowser visibility.',
  `s_browse_columns` text COMMENT 'Metabrowser columns.',
  `s_project_show` enum('hide','show') DEFAULT NULL COMMENT 'Project panel visibility.',
  `s_project_width` int(11) DEFAULT NULL COMMENT 'Project panel width.',
  `s_project_exts` tinyint(1) DEFAULT NULL COMMENT 'Show file extensions in project track names.',
  `s_download_zip` enum('never','folders','multiple','always','push') DEFAULT NULL COMMENT 'Zip up multiple track downloads into a single zip file.',
  `s_download_flatten` tinyint(1) DEFAULT NULL COMMENT 'Flatten folder downloads by collapsing the folder structure.',
  `s_wdgts` text COMMENT 'Widgets structure.',
  `hash` text,
  `orig_id` int(10) unsigned DEFAULT NULL COMMENT 'Transiet field used when doing complex copy operations.',
  `s_static_options` text,
  `s_panel_selected` tinyint(1) DEFAULT '0',
  `s_selective_show` tinyint(1) DEFAULT '0',
  `u_selective_show` tinyint(1) DEFAULT '0',
  `s_topics_show` enum('hide','show') DEFAULT 'hide',
  `u_topics_show` enum('hide','show') DEFAULT 'hide',
  `p_times` varchar(25) DEFAULT NULL,
  `u_continuous_show` enum('on','off') DEFAULT 'on',
  `s_continuous_show` enum('on','off') DEFAULT 'on',
  `u_panel_selected` int(11) DEFAULT '0',
  `u_static_options` text,
  `s_topics_show_details` text,
  `u_topics_show_details` text,
  `s_set_topics_sections` text,
  `u_set_topics_sections` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `settings`
-- ----------------------------
BEGIN;
INSERT INTO `settings` VALUES ('1', '0', '0', '0', '0', '0', '{\"column\":\"Database\",\"new\":0,\"def\":[],\"0\":[],\"1\":[],\"2\":[],\"3\":[]}', '{\"new\":0,\"def\":[],\"0\":[],\"1\":[]}', '{\"new\":1,\"def\":[],\"0\":[],\"1\":[]}', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '{\"Relevance\":\"descend\",\"Library\":\"ascend\",\"Volume\":\"descend\",\"Track\":\"ascend\"}', '{\"Relevance\":\"descend\",\"Library\":\"ascend\",\"Volume\":\"descend\"}', 'db', '0', 'tracks', '0', '[[\"Artwork\",1,1,67],[\"Waveform\",0,0,50],[\"Library\",1,1,102],[\"TrackTitle\",1,1,110],[\"Description\",1,0,304],[\"CDTitle\",0,0,50],[\"Composer\",1,0,50],[\"Notes\",0,0,50],[\"Filename\",0,0,50],[\"Source\",0,0,50],[\"Publisher\",1,0,50],[\"SampleRate\",0,0,50],[\"Channels\",0,0,50],[\"Show\",0,0,50],[\"FileType\",0,0,50],[\"CDDescription\",0,0,50],[\"Keywords\",0,0,50],[\"ModificationDate\",0,0,50],[\"Arranger\",0,0,50],[\"Category\",1,0,60],[\"Duration\",1,1,58],[\"Relevance\",1,1,50]]', 'Relevance', '15', 'off', 'auto', 'hide', '[\"Library\",\"Category\",\"Composer\",\"CDTitle\"]', 'show', '265', '1', 'multiple', '0', '{\"wid\":\"1\",\"wdgts\":{\"1\":{\"wid\":\"1\",\"type\":\"layout\",\"style\":\"collapsible\",\"title\":\"Layout\",\"layout\":\"layout-3\",\"head\":[],\"col1\":[\"3\"],\"col2\":[\"2\"],\"col3\":[\"4\"],\"foot\":[]},\"3\":{\"wid\":\"3\",\"type\":\"summary\",\"style\":\"collapsible\",\"title\":\"Library\",\"column\":\"Library\",\"sort\":\"ascend\"},\"2\":{\"wid\":\"2\",\"type\":\"html\",\"style\":\"naked\",\"title\":\"Html\",\"html\":\"<h2 style=\\\"text-align: center; font-weight: bold;\\\">Welcome!<\\/h2>\"},\"4\":{\"wid\":\"4\",\"type\":\"summary\",\"style\":\"collapsible\",\"title\":\"Category\",\"column\":\"Category\",\"sort\":\"ascend\"}}}', '{}', null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('2', '0', '0', '0', '0', '0', '{\"column\":\"Database\",\"new\":1,\"def\":[],\"0\":[],\"1\":[],\"2\":[],\"3\":[]}', '{\"new\":0,\"def\":[\"BPM\",\"BitDepth\",\"ChannelLayout\",\"Conductor\",\"CreationDate\",\"Designer\",\"EntryDate\",\"FeaturedInstrument\",\"FilePath\",\"Key\",\"Location\",\"LongID\",\"Manufacturer\",\"Microphone\",\"Pathname\",\"Performer\",\"Popularity\",\"Rating\",\"RecID\",\"RecMedium\",\"RecType\",\"Scene\",\"ShortID\",\"Split\",\"SubCategory\",\"Take\",\"Tape\",\"TotalFrames\"],\"0\":[\"CueNo\",\"CueTime\",\"CueUsage\",\"Database\",\"DateAddedToSystem\",\"Index\",\"Time\",\"Track\",\"Volume\"],\"1\":[\"Arranger\",\"Artwork\",\"CDDescription\",\"CDTitle\",\"Category\",\"Channels\",\"Composer\",\"Description\",\"Duration\",\"FileType\",\"Filename\",\"Keywords\",\"Library\",\"ModificationDate\",\"Notes\",\"Publisher\",\"Relevance\",\"SampleRate\",\"Show\",\"Source\",\"TrackTitle\",\"Waveform\"]}', '{\"new\":null,\"def\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"],\"0\":[],\"1\":[]}', null, null, null, null, '1', null, null, null, null, '1', '1', '1', null, null, null, null, null, null, null, '0', '{\"Relevance\":\"ascend\",\"Library\":\"ascend\",\"Volume\":\"descend\",\"Track\":\"ascend\"}', '{\"Library\":\"ascend\",\"Volume\":\"descend\"}', null, null, null, null, null, null, null, null, null, null, null, null, '265', '1', null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('3', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '265', null, null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('4', '1', '1', '1', '1', '1', '{\"column\":\"Database\",\"new\":2,\"def\":[],\"0\":[],\"1\":[],\"2\":[],\"3\":[]}', '{\"new\":1,\"def\":[],\"0\":[],\"1\":[]}', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '1', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '265', '1', null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('5', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '265', null, null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('6', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '265', null, null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('7', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '265', null, null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('8', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '265', null, null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('9', '1', '1', '1', '1', '1', '{\"column\":\"Database\",\"new\":2,\"def\":[],\"0\":[],\"1\":[],\"2\":[],\"3\":[]}', '{\"new\":1,\"def\":[],\"0\":[],\"1\":[]}', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '1', null, null, null, 'db', '0', 'tracks', '0', '[[\"Artwork\",1,1,67],[\"TrackTitle\",1,1,110],[\"Waveform\",0,0,50],[\"Library\",1,1,141],[\"CDTitle\",0,0,50],[\"Composer\",1,0,50],[\"Notes\",0,0,50],[\"Filename\",0,0,50],[\"Source\",0,0,50],[\"Publisher\",1,0,50],[\"SampleRate\",0,0,50],[\"Channels\",0,0,50],[\"Show\",0,0,50],[\"FileType\",0,0,50],[\"CDDescription\",0,0,50],[\"Keywords\",0,0,50],[\"ModificationDate\",0,0,50],[\"Arranger\",0,0,50],[\"Category\",1,1,60],[\"Description\",1,0,68],[\"Duration\",1,0,54],[\"Relevance\",1,1,50],[\"Database\",0,0,50],[\"RecID\",0,0,50],[\"Pathname\",0,0,50],[\"FilePath\",0,0,50],[\"SubCategory\",0,0,50],[\"Manufacturer\",0,0,50],[\"Designer\",0,0,50],[\"RecType\",0,0,50],[\"ShortID\",0,0,50],[\"LongID\",0,0,50],[\"RecMedium\",0,0,50],[\"Rating\",0,0,50],[\"Location\",0,0,50],[\"Microphone\",0,0,50],[\"Performer\",0,0,50],[\"Conductor\",0,0,50],[\"FeaturedInstrument\",0,0,50],[\"Scene\",0,0,50],[\"Take\",0,0,50],[\"Tape\",0,0,50],[\"CreationDate\",0,0,50],[\"TotalFrames\",0,0,50],[\"EntryDate\",0,0,50],[\"Popularity\",0,0,50],[\"Split\",0,0,50],[\"BitDepth\",0,0,50],[\"ChannelLayout\",0,0,50],[\"BPM\",0,0,50],[\"Key\",0,0,50],[\"Time\",0,0,50],[\"Volume\",0,0,50],[\"Track\",0,0,50],[\"Index\",0,0,50],[\"CueNo\",0,0,50],[\"CueUsage\",0,0,50],[\"CueTime\",0,0,50],[\"DateAddedToSystem\",0,0,50]]', 'Description', '15', 'off', 'fixed', 'hide', '[\"Library\",\"Category\",\"Composer\",\"CDTitle\"]', 'hide', '265', '1', 'multiple', '0', null, '{}', null, null, '0', null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('10', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 'db', '0', 'tracks', '0', '[[\"Artwork\",1,1,67],[\"Waveform\",0,0,50],[\"Library\",1,1,102],[\"TrackTitle\",1,1,110],[\"Description\",1,0,304],[\"CDTitle\",0,0,50],[\"Composer\",1,0,50],[\"Notes\",0,0,50],[\"Filename\",0,0,50],[\"Source\",0,0,50],[\"Publisher\",1,0,50],[\"SampleRate\",0,0,50],[\"Channels\",0,0,50],[\"Show\",0,0,50],[\"FileType\",0,0,50],[\"CDDescription\",0,0,50],[\"Keywords\",0,0,50],[\"ModificationDate\",0,0,50],[\"Arranger\",0,0,50],[\"Category\",1,0,60],[\"Duration\",1,1,58],[\"Relevance\",1,1,50]]', 'Relevance', '15', 'off', 'auto', 'hide', '[\"Library\",\"Category\",\"Composer\",\"CDTitle\"]', 'show', '265', null, 'multiple', '0', null, '{}', null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('11', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 'db', '0', 'tracks', '0', '[[\"Artwork\",1,1,67],[\"Waveform\",0,0,50],[\"Library\",1,1,102],[\"TrackTitle\",1,1,110],[\"Description\",1,0,304],[\"CDTitle\",0,0,50],[\"Composer\",1,0,50],[\"Notes\",0,0,50],[\"Filename\",0,0,50],[\"Source\",0,0,50],[\"Publisher\",1,0,50],[\"SampleRate\",0,0,50],[\"Channels\",0,0,50],[\"Show\",0,0,50],[\"FileType\",0,0,50],[\"CDDescription\",0,0,50],[\"Keywords\",0,0,50],[\"ModificationDate\",0,0,50],[\"Arranger\",0,0,50],[\"Category\",1,0,60],[\"Duration\",1,1,58],[\"Relevance\",1,1,50]]', 'Relevance', '15', 'off', 'auto', 'hide', '[\"Library\",\"Category\",\"Composer\",\"CDTitle\"]', 'show', '265', null, 'multiple', '0', null, '{}', null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null), ('13', null, null, null, null, null, '{\"column\":\"Database\",\"new\":1,\"def\":[],\"0\":[],\"1\":[],\"2\":[],\"3\":[]}', '{\"new\":null,\"def\":[\"Arranger\",\"Artwork\",\"BPM\",\"BitDepth\",\"CDDescription\",\"CDTitle\",\"Category\",\"ChannelLayout\",\"Channels\",\"Composer\",\"Conductor\",\"CreationDate\",\"CueNo\",\"CueTime\",\"CueUsage\",\"Database\",\"DateAddedToSystem\",\"Description\",\"Designer\",\"Duration\",\"EntryDate\",\"FeaturedInstrument\",\"FilePath\",\"FileType\",\"Filename\",\"Index\",\"Key\",\"Keywords\",\"Library\",\"Location\",\"LongID\",\"Manufacturer\",\"Microphone\",\"ModificationDate\",\"Notes\",\"Pathname\",\"Performer\",\"Popularity\",\"Publisher\",\"Rating\",\"RecID\",\"RecMedium\",\"RecType\",\"Relevance\",\"SampleRate\",\"Scene\",\"ShortID\",\"Show\",\"Source\",\"Split\",\"SubCategory\",\"Take\",\"Tape\",\"Time\",\"TotalFrames\",\"Track\",\"TrackTitle\",\"Volume\",\"Waveform\"],\"0\":[],\"1\":[]}', '{\"new\":null,\"def\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"],\"0\":[],\"1\":[]}', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 'on', 'on', '0', null, null, null, null, null);
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.';

-- ----------------------------
--  Table structure for `site`
-- ----------------------------
CREATE TABLE `site` (
  `site_title` varchar(255) NOT NULL COMMENT '<title></title>',
  `site_description` text NOT NULL COMMENT '<meta name="description" content="" />',
  `site_keywords` text NOT NULL COMMENT '<meta name="keywords" content="" />',
  `name_project` varchar(30) NOT NULL DEFAULT '',
  `name_folder` varchar(20) NOT NULL DEFAULT '',
  `name_spot` varchar(20) NOT NULL DEFAULT '',
  `name_track` varchar(20) NOT NULL DEFAULT '',
  `email_type` varchar(10) NOT NULL DEFAULT 'smtp',
  `email_from` varchar(255) DEFAULT NULL,
  `email_name` varchar(255) DEFAULT NULL,
  `email_sender` varchar(255) DEFAULT NULL,
  `email_usender` varchar(255) DEFAULT NULL,
  `email_host` varchar(255) DEFAULT NULL,
  `email_username` varchar(255) DEFAULT NULL,
  `email_password` varchar(255) DEFAULT NULL,
  `login_guest` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `login_remember` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `albuming` varchar(255) DEFAULT NULL,
  `grouping` varchar(255) DEFAULT NULL,
  `home_url` text,
  `home_skip` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Skip Home Screen on login.',
  `metadata_order` varchar(5000) NOT NULL DEFAULT '["Filename","TrackTitle","CDTitle","Library","Database","Category","Composer","Publisher","Time","Description"]',
  `album_volume` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Display Volume field under album covers.',
  `css_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Flag to enable custom CSS stylesheets.',
  `date_full` varchar(32) NOT NULL COMMENT 'Full date format using PHP date format string.',
  `date_long` varchar(32) NOT NULL COMMENT 'Long date format using PHP date format string.',
  `date_medium` varchar(32) NOT NULL COMMENT 'Medium date format using PHP date format string.',
  `date_short` varchar(32) NOT NULL COMMENT 'Short date format using PHP date format string.',
  `player` enum('html5','flashV2','flashV3','waveformPlayer','flash','quicktime','universal','qtSimple','flowPlayer','flashMp3Player','xspfPlayerSlim','originalSingle','jwPlayer','resizableMp3Player','html5full') DEFAULT NULL,
  `registration` enum('none','instant','email','alert') NOT NULL DEFAULT 'none' COMMENT 'Auto registration options.',
  `registration_alert` varchar(255) NOT NULL COMMENT 'Auto registration alert email addresses.',
  `registration_email` text NOT NULL COMMENT 'Json structure for the email to send new registering users.',
  `registration_fields` text NOT NULL COMMENT 'Json array of fields to include in the registration form.',
  `registration_company` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Company field is required for registration.',
  `hash` text NOT NULL COMMENT 'Miscellaneous settings stored in a free-form JSON hash.',
  `login_head` text NOT NULL COMMENT 'Custom HTML to insert at end of <head></head>.',
  `login_body1` text NOT NULL COMMENT 'Custom HTML to insert at start of <body></body>.',
  `login_body2` text NOT NULL COMMENT 'Custom HTML to insert at end of <body></body>.',
  `main_head` text NOT NULL COMMENT 'Custom HTML to insert at end of <head></head>.',
  `main_body1` text NOT NULL COMMENT 'Custom HTML to insert at start of <body></body>.',
  `main_body2` text NOT NULL COMMENT 'Custom HTML to insert at end of <body></body>.',
  `admin_head` text NOT NULL COMMENT 'Custom HTML to insert at end of <head></head>.',
  `admin_body1` text NOT NULL COMMENT 'Custom HTML to insert at start of <body></body>.',
  `admin_body2` text NOT NULL COMMENT 'Custom HTML to insert at end of <body></body>.',
  `cue_columns` text NOT NULL COMMENT 'Json array of columns to include in cuesheets.',
  `cue_pdf` enum('table','vertical') NOT NULL DEFAULT 'table' COMMENT 'Cuesheet PDF report format.',
  `cue_renames` text NOT NULL COMMENT 'Cuesheet field rename mapping.',
  `cue_top` float NOT NULL COMMENT 'Cuesheet PDF top margin in mm.',
  `cue_bottom` float NOT NULL COMMENT 'Cuesheet PDF bottom margin in mm.',
  `cue_left` float NOT NULL COMMENT 'Cuesheet PDF left margin in mm.',
  `cue_right` float NOT NULL COMMENT 'Cuesheet PDF right margin in mm.',
  `cue_header` float NOT NULL COMMENT 'Cuesheet PDF header offset in mm.',
  `cue_footer` float NOT NULL COMMENT 'Cuesheet PDF footer offset in mm.',
  `cue_orientation` enum('portrait','landscape') NOT NULL DEFAULT 'portrait' COMMENT 'Cuesheet PDF orientation.',
  `down_push` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Enable server-side share option.',
  `down_push_path` varchar(255) NOT NULL DEFAULT '' COMMENT 'Server-side share path.',
  `all_sources` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Enable All Sources search option.',
  `reset_sort` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Reset user''s sort order on new search.',
  `suggest` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Enable Search Suggest.',
  `help_url` text NOT NULL COMMENT 'URL to client supplied help page.',
  `lic_id` varchar(40) NOT NULL COMMENT 'License ID.',
  `lic_data` text NOT NULL COMMENT 'License data.',
  `lic_key` text NOT NULL,
  `user_username_change` tinyint(4) DEFAULT NULL,
  `site_template` varchar(25) DEFAULT NULL,
  `cue_col_details` varchar(500) DEFAULT NULL,
  `reg_emails` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Site-wide settings';

-- ----------------------------
--  Records of `site`
-- ----------------------------
BEGIN;
INSERT INTO `site` VALUES ('MM Dev', '', '', 'Project', 'Folder', 'Playlist', 'Asset', 'smtpauth', '', '', '', '', '', '', '', '1', '1', 'CDTitle', 'TrackTitle', null, '0', '[\"Filename\",\"TrackTitle\",\"CDTitle\",\"Library\",\"Database\",\"Category\",\"Composer\",\"Publisher\",\"Time\",\"Description\"]', '1', '0', 'l, F j, Y', 'F j, Y', 'M j, Y', 'n/j/y', 'flash', 'none', '', '{\"cc\":\"\",\"bcc\":\"\",\"subject\":\"[%site_name%] Registration Confirmation\",\"message\":\"Hi %user%,\\n\\nYour registration for %site_name% is almost complete.\\n\\nCOMPLETE REGISTRATION:\\n\\nTo complete your registration and gain instant access click this link:\\n%link_confirm%\\n\\nCANCEL REGISTRATION:\\n\\nTo cancel your registration follow this link:\\n%link_cancel%\\n\\n%site_name%\"}', '{\"first_name\":{\"displayed\":true,\"required\":true},\"last_name\":{\"displayed\":true,\"required\":true},\"address1\":{\"displayed\":true,\"required\":true},\"city\":{\"displayed\":true,\"required\":true},\"region\":{\"displayed\":true,\"required\":true},\"postal_code\":{\"displayed\":true,\"required\":true},\"country_iso\":{\"displayed\":true,\"required\":true},\"company\":{\"displayed\":true,\"required\":true},\"phone\":{\"displayed\":true,\"required\":true},\"phone_cell\":{\"displayed\":true,\"required\":false},\"phone_fax\":{\"displayed\":true,\"required\":false},\"job_title\":{\"displayed\":true,\"required\":false},\"business_type\":{\"displayed\":true,\"required\":false}}', '0', '{\"home_categories\":0}', '', '', '', '<link rel=\"stylesheet\" type=\"text/css\" href=\"/custom/custom.video.css\" />', '', '', '', '', '', '[\"CueNo\",\"TrackTitle\",\"ShortID\",\"Composer\",\"Publisher\",\"CueInTime\",\"CueOutTime\",\"CueTime\",\"CueUsage\",\"Library\",\"CueUsage\",\"Database\"]', 'table', '[]', '10', '15', '10', '10', '5', '5', 'portrait', '0', '', '1', '0', '1', '', '', '', '', '0', '', '[false,false,false,false,true,false,false,false,false,false,false]', null);
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 `suggest`
-- ----------------------------
CREATE TABLE `suggest` (
  `suggest` varchar(128) NOT NULL,
  `src` int(11) NOT NULL,
  `key` varchar(128) NOT NULL,
  `ndx` int(11) NOT NULL,
  `sort` double NOT NULL,
  KEY `search` (`sort`,`src`,`key`,`suggest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

-- ----------------------------
--  Table structure for `users`
-- ----------------------------
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `key` char(40) NOT NULL COMMENT 'Private random sha1 string per user for security.',
  `type` enum('system','template','user') NOT NULL DEFAULT 'user',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Flag - user account has been deleted.',
  `enabled` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Flag - user account is enabled.',
  `expires` date DEFAULT NULL COMMENT 'Date account expires and becomes disabled. NULL = never.',
  `registering` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Flag - user is in the process of registering.',
  `group_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  `settings_id` int(11) NOT NULL COMMENT 'User''s settings.',
  `folder_id` int(11) NOT NULL COMMENT 'Root folder of user''s personal project content.',
  `user` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `username` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `password` varchar(32) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `reset_hash` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
  `reset_password` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
  `email` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `company` varchar(128) NOT NULL COMMENT 'Company user works for.',
  `phone` varchar(32) NOT NULL COMMENT 'Phone number.',
  `rep` varchar(128) NOT NULL COMMENT 'Sales representative.',
  `country_iso` varchar(3) DEFAULT NULL,
  `player` enum('html5','flashV2','flashV3','waveformPlayer','flash','quicktime','universal','qtSimple','flowPlayer','flashMp3Player','xspfPlayerSlim','originalSingle','jwPlayer','resizableMp3Player','html5full') DEFAULT NULL,
  `is_public` tinyint(4) DEFAULT '0',
  `address1` varchar(100) DEFAULT NULL,
  `address2` varchar(100) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `region` varchar(50) DEFAULT NULL,
  `postal_code` varchar(30) DEFAULT NULL,
  `phone_fax` varchar(32) DEFAULT NULL,
  `phone_cell` varchar(32) DEFAULT NULL,
  `contract_owner` varchar(50) DEFAULT NULL,
  `contract_type` varchar(50) DEFAULT NULL,
  `related_contact_id` varchar(25) DEFAULT NULL,
  `original_cuegle_id` int(4) DEFAULT NULL,
  `business_type` varchar(25) DEFAULT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `notes` text,
  `date_registered` datetime DEFAULT NULL,
  `original_external_imported_id` int(4) DEFAULT NULL,
  `job_title` varchar(50) DEFAULT NULL,
  `sales_person` tinyint(1) DEFAULT NULL,
  `rep_selected` int(4) DEFAULT NULL,
  `country_text` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `folder_index` (`folder_id`,`id`),
  KEY `group_id` (`group_id`),
  KEY `role_id` (`role_id`),
  KEY `settings_id` (`settings_id`),
  KEY `folder_id` (`folder_id`),
  KEY `enabled` (`enabled`),
  KEY `is_public` (`is_public`),
  KEY `username_index` (`username`,`password`),
  KEY `country_text` (`country_text`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `users`
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES ('1', '2daae8e26aaf130e067895f36e31aa9ef4880f95', 'system', '0', '1', null, '0', null, null, '9', '1', 'Admin', 'admin', '21232f297a57a5a743894a0e4a801fc3', null, null, '', '', '', '', '', '', '0', '', '', '', '', '', '', '', null, null, null, null, '', '', '', '', '0000-00-00 00:00:00', null, '', '0', '0', null), ('2', 'c2002a9449b44bf6303e369484ea6aa17942df75', 'system', '0', '1', null, '0', null, null, '10', '2', 'Guest', 'guest', '', null, null, '', '', '', '', null, '', '0', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '0000-00-00 00:00:00', null, null, '0', null, null), ('3', '06082ee4d17ed8b61e52a7b75d7de935cddbc03d', 'template', '0', '1', null, '0', null, null, '11', '3', 'Default', 'default', '', null, null, '', '', '', '', null, '', '0', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, '0000-00-00 00:00:00', null, null, '0', null, null);
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;

