##----------------------------------------------------------------------------------#
 # MusicMiner Web Server															#
 # Name:		source/app/sql/upgrade_0-6-0_to_0-6-1.sql							#
 # Author:		Jesse J Morrow	(jesse@jessejmorrow.com)							#
 # Created:		2007-06-19															#
 # Updated:		2007-06-21															#
 # Compat:		MySQL 5																#
 # Copyright:	Copyright 2007 Soundminer Inc.										#
 # Purpose:		Upgrade the installed MusicMiner databases.							#
 # Version:		0.6.0 to 0.6.1														#
 #----------------------------------------------------------------------------------##

# Alter `site` table to include date format fields and player preference
ALTER TABLE `mm_admin`.`site` ADD COLUMN `date_full` VARCHAR(32) NOT NULL COMMENT 'Full date format using PHP date format string.' AFTER `css_enabled`,
 ADD COLUMN `date_long` VARCHAR(32) NOT NULL COMMENT 'Long date format using PHP date format string.' AFTER `date_full`,
 ADD COLUMN `date_medium` VARCHAR(32) NOT NULL COMMENT 'Medium date format using PHP date format string.' AFTER `date_long`,
 ADD COLUMN `date_short` VARCHAR(32) NOT NULL COMMENT 'Short date format using PHP date format string.' AFTER `date_medium`,
 ADD COLUMN `player` ENUM('flash','quicktime') NOT NULL DEFAULT 'quicktime' COMMENT 'The embedded media player to use for audition playback.' AFTER `date_short`;
UPDATE `mm_admin`.`site` SET `date_full` = 'l, F j, Y', `date_long` = 'F j, Y', `date_medium` = 'M j, Y', `date_short` = 'n/j/y', `player` = 'quicktime';

# Update version fields
UPDATE `mm_admin`.`schema` SET `mm_ver` = '0.6.1', `db_ver` = '0.6.1';
UPDATE `mm_cache`.`schema` SET `mm_ver` = '0.6.1';
UPDATE `mm_logs`.`schema` SET `mm_ver` = '0.6.1';