##----------------------------------------------------------------------------------#
 # MusicMiner Web Server															#
 # Name:		source/app/sql/upgrade_0-9-8_to_0-9-9.sql							#
 # Author:		Jesse J Morrow	(jesse@jessejmorrow.com)							#
 # Created:		2007-12-13															#
 # Updated:		2008-01-17															#
 # Compat:		MySQL 5																#
 # Copyright:	Copyright 2007 Soundminer Inc.										#
 # Purpose:		Upgrade the installed MusicMiner databases.							#
 # Version:		0.9.8 to 0.9.9														#
 #----------------------------------------------------------------------------------##

CREATE TABLE `mm_admin`.`help` (
  `id` varchar(32) NOT NULL COMMENT 'Unique help page identifier.',
  `title` varchar(255) NOT NULL COMMENT 'Displayable topic title.',
  `content` text NOT NULL COMMENT 'Help topic content.',
  `file` varchar(255) NOT NULL COMMENT 'File path of HLP file containing help content.',
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `search` (`title`,`content`)
) ENGINE = MYISAM CHARACTER SET utf8;

ALTER TABLE `mm_admin`.`site` ADD COLUMN `login_head` TEXT NOT NULL COMMENT 'Custom HTML to insert at end of <head></head>.' AFTER `html_footer_height`,
 ADD COLUMN `login_body1` TEXT NOT NULL COMMENT 'Custom HTML to insert at start of <body></body>.' AFTER `login_head`,
 ADD COLUMN `login_body2` TEXT NOT NULL COMMENT 'Custom HTML to insert at end of <body></body>.' AFTER `login_body1`;

# Update version fields
UPDATE `mm_admin`.`schema` SET `db_ver` = '0.9.9';