From 3634ba80946b818de7f0505ed44d947e70dd41ec Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 12 May 2008 05:58:17 +0000 Subject: added in some caching and add the database upgrade that will make the taging mostly work --- lib/class/update.class.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'lib/class/update.class.php') diff --git a/lib/class/update.class.php b/lib/class/update.class.php index a02d93ca..da6b7da8 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -277,6 +277,11 @@ class Update { $version[] = array('version' => '340018','description'=>$update_string); + $update_string = '- Modify the Tag tables so that they actually work.
' . + '- Alter the Prefix fields to allow for more prefixs.
'; + + $version[] = array('version' => '350001','description'=>$update_string); + return $version; @@ -1328,5 +1333,33 @@ class Update { } // update_340018 + /** + * update_350001 + * This updates modifies the tag tables per codeunde1load's specs from his tag patch + * it also adjusts the prefix fields so that we can use more prefixes + */ + public static function update_350001() { + + $sql = "ALTER TABLE `tag_map` ADD `tag_id` INT ( 11 ) UNSIGNED NOT NULL AFTER `id`"; + $db_results = Dba::query($sql); + + $sql = "RENAME TABLE `ampache`.`tags` TO `ampache`.`tag`"; + $db_results = Dba::query($sql); + + $sql = "ALTER TABLE `tag` CHANGE `map_id` `id` INT ( 11 ) UNSIGNED NOT NULL auto_increment"; + $db_results = Dba::query($sql); + + $sql = "ALTER TABLE `album` CHANGE `prefix` `prefix` VARCHAR ( 32 ) NULL"; + $db_results = Dba::query($sql); + + $sql = "ALTER TABLE `artist` CHANGE `prefix` `prefix` VARCHAR ( 32 ) NULL"; + $db_results = Dba::query($sql); + + self::set_version('db_version','350001'); + + return true; + + } // update_350001 + } // end update class ?> -- cgit