summaryrefslogtreecommitdiffstats
path: root/lib/class/update.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-06-02 01:42:55 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-06-02 01:42:55 +0000
commit94f5610ef6c66dc094372e76df9a6d8783e9bc7f (patch)
tree90b9f2c265c29f50cd0e5a366b8a3cd90ee78593 /lib/class/update.class.php
parent778fe71fed0de15b7cda3efcf30d90739ec46c78 (diff)
downloadampache-94f5610ef6c66dc094372e76df9a6d8783e9bc7f.tar.gz
ampache-94f5610ef6c66dc094372e76df9a6d8783e9bc7f.tar.bz2
ampache-94f5610ef6c66dc094372e76df9a6d8783e9bc7f.zip
add MBID support Thx flowerysong
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r--lib/class/update.class.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 5a36b253..0b63e354 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -323,6 +323,11 @@ class Update {
$version[] = array('version'=>'350008','description'=>$update_string);
+ $update_string = '- Add MBID (MusicBrainz ID) fields<br />' .
+ '- Remove useless preferences<br />';
+
+ $version[] = array('version'=>'360001','description'=>$update_string);
+
return $version;
@@ -1758,10 +1763,20 @@ class Update {
/**
* update_360001
- * This adds the mbid id's to the different tables as well as some additional cleanup
+ * This adds the MB UUIDs to the different tables as well as some additional cleanup
*/
public static function update_360001() {
+
+ $sql = "ALTER TABLE `album` ADD `mbid` CHAR ( 36 ) AFTER `prefix`";
+ $db_results = Dba::write($sql);
+
+ $sql = "ALTER TABLE `artist` ADD `mbid` CHAR ( 36 ) AFTER `prefix`";
+ $db_results = Dba::write($sql);
+
+ $sql = "ALTER TABLE `song` ADD `mbid` CHAR ( 36 ) AFTER `track`";
+ $db_results = Dba::write($sql);
+
// Remove any RIO related information from the database as the plugin has been removed
$sql = "DELETE FROM `update_info` WHERE `key` LIKE 'Plugin_Ri%'";
$db_results = Dba::write($sql);
@@ -1778,7 +1793,7 @@ class Update {
User::fix_preferences($r['id']);
} // while we're fixing the useres stuff
- // self::set_version('db_version','360001');
+ self::set_version('db_version','360001');
} // update_360001