diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-28 21:18:33 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-28 21:48:10 -0500 |
commit | 0d569db17b0200dde895d645802680209ba57deb (patch) | |
tree | 6f74cfebc376a0d03d4c877f64af57f32bb2e73a | |
parent | 1b4fe6a2b1204a894e662745d13f21ab15650d47 (diff) | |
download | ampache-0d569db17b0200dde895d645802680209ba57deb.tar.gz ampache-0d569db17b0200dde895d645802680209ba57deb.tar.bz2 ampache-0d569db17b0200dde895d645802680209ba57deb.zip |
Fix incorrect updates
Starting with a fresh 3.3.3.5 import these updates failed. Kick them to
the curb.
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/class/update.class.php | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index ba9cc2e2..fc228610 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.6-FUTURE + - Made database updates more robust and verified that a fresh 3.3.3.5 import + will run through the updates without errors - Added support for external authenticators like pwauth (based on a patch by sjlu) - Renamed the local auth method to pam, which is less confusing diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 6f0fd8eb..f730b335 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -619,9 +619,6 @@ class Update { */ public static function update_340005() { $retval = true; - // Turn user_rating into a tinyint and call it score - $sql = "ALTER TABLE `rating` CHANGE `user_rating` `score` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '0'"; - $retval = Dba::write($sql) ? $retval : false; $sql = "UPDATE `preference` SET `catagory`='playlist' WHERE `name`='random_method'"; $retval = Dba::write($sql) ? $retval : false; @@ -892,7 +889,7 @@ class Update { * done this in the previous one but I screwed up... sigh. */ public static function update_340016() { - $sql = "ALTER TABLE `democratic` ADD `base_playlist` INT ( 11 ) UNSIGNED NOT NULL"; + $sql = "ALTER TABLE `democratic` ADD `base_playlist` INT ( 11 ) UNSIGNED NOT NULL AFTER `name`"; return Dba::write($sql); } @@ -904,8 +901,6 @@ class Update { */ public static function update_340017() { $retval = true; - $sql = "ALTER TABLE `democratic` ADD `base_playlist` INT( 11 ) UNSIGNED NOT NULL AFTER `name`"; - $retval = Dba::write($sql) ? $retval : false; $sql = "ALTER TABLE `tmp_playlist` DROP `base_playlist`"; $retval = Dba::write($sql) ? $retval : false; @@ -984,9 +979,6 @@ class Update { $sql = "ALTER TABLE `tag` DROP `order`"; $retval = Dba::write($sql) ? $retval : false; - $sql = "ALTER TABLE `tag` DROP INDEX `order`"; - $retval = Dba::write($sql) ? $retval : false; - $sql = "ALTER TABLE `tag` ADD UNIQUE ( `name` )"; $retval = Dba::write($sql) ? $retval : false; |