diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-12 05:58:17 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-12 05:58:17 +0000 |
commit | 3634ba80946b818de7f0505ed44d947e70dd41ec (patch) | |
tree | 03749fb9cc1f1fc6ef157ac187cea48f1f1a7098 /lib/class/update.class.php | |
parent | 3e36e0b01e843ec8d4e8a63a72e5f7425921dab8 (diff) | |
download | ampache-3634ba80946b818de7f0505ed44d947e70dd41ec.tar.gz ampache-3634ba80946b818de7f0505ed44d947e70dd41ec.tar.bz2 ampache-3634ba80946b818de7f0505ed44d947e70dd41ec.zip |
added in some caching and add the database upgrade that will make the taging mostly work
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r-- | lib/class/update.class.php | 33 |
1 files changed, 33 insertions, 0 deletions
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.<br />' . + '- Alter the Prefix fields to allow for more prefixs.<br />'; + + $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 ?> |