##----------------------------------------------------------------------------------#
 # MusicMiner Web Server															#
 # Name:		source/app/sql/upgrade_1.2.0.sql									#
 # Author:		Jesse J Morrow	(jesse@jessejmorrow.com)							#
 # Created:		2010-03-04															#
 # Updated:		2010-05-11															#
 # Compat:		MySQL 5																#
 # Copyright:	Copyright 2010 Soundminer Inc.										#
 # Purpose:		Upgrade the installed MusicMiner databases.							#
 # Version:		1.2.2 to 1.2.3														#
 #----------------------------------------------------------------------------------##

CREATE TABLE `mm_admin`.`onepages` (
  `id` varchar(255) NOT NULL,
  `user_id` int(11) NOT NULL,
  `playlist_id` int(11) NOT NULL,
  `orig_playlist_id` INT NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `columns` varchar(255) NOT NULL,
  `download` bool NOT NULL DEFAULT 0,
  `password` char(30) DEFAULT NULL,
  `expires` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `mm_cache`.`results` (
  `table` varchar(255) NOT NULL,
  `data` varchar(5000) NOT NULL,
  PRIMARY KEY (`table`)
)
CHARACTER SET utf8;

#-----------------------------------------------------------------------------
# Versions
#-----------------------------------------------------------------------------

# Update version fields
UPDATE `mm_admin`.`schema` SET `db_ver` = '1.2.3', `sm_ver` = '1.2.3';