From ce094e4d95762791de7fa32b0a83ab0da7254d70 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 16 Aug 2007 15:37:31 +0000 Subject: first step towards multi-disk support, Thx Hugo Haas --- lib/class/update.class.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'lib/class/update.class.php') diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 2c5f5694..a5160c7e 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -227,6 +227,12 @@ class Update { $version[] = array('version' => '340008','description' => $update_string); + $update_string = '- Added disk to Album table.
' . + '- Added artist_data for artist images and bios.
' . + '- Added DNS to access list to allow for dns based ACLs.
'; + + $version[] = array('version' => '340009','description' => $update_string); + return $version; } // populate_version @@ -904,5 +910,34 @@ class Update { } // update_340008 + /** + * update_340009 + * This modifies the song table to handle pos fields + */ + public static function update_340009() { + + $sql = "ALTER TABLE `album` ADD `disk` smallint(5) UNSIGNED DEFAULT NULL"; + $db_results = Dba::query($sql); + + $sql = "ALTER TABLE `album` ADD INDEX (`disk`)"; + $db_results = Dba::query($sql); + + $sql = "ALTER TABLE `access_list` ADD `dns` VARCHAR( 255 ) NOT NULL AFTER `end`"; + $db_results = Dba::query($sql); + + $sql = "CREATE TABLE `artist_data` (" . + "`artist_id` INT( 11 ) UNSIGNED NOT NULL ," . + "`art` MEDIUMBLOB NOT NULL ," . + "`art_mime` VARCHAR( 32 ) NOT NULL ," . + "`thumb` BLOB NOT NULL ," . + "`thumb_mime` VARCHAR( 32 ) NOT NULL ," . + "`bio` TEXT NOT NULL , " . + "UNIQUE (`artist_id`) ) ENGINE = MYISAM"; + $db_results = Dba::query($sql); + + self::set_version('db_version','340009'); + + } // update_340009 + } // end update class ?> -- cgit