diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-31 07:22:18 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-31 07:22:18 +0000 |
commit | f8c98952aa5a8a30a50160db864217d6bf942a8f (patch) | |
tree | 96e537df58a24cc024a975f8414e3e06aa8fae1d /lib/class/update.class.php | |
parent | 2148ecc8ac957beb53ac1be3b6d7aafba491b7aa (diff) | |
download | ampache-f8c98952aa5a8a30a50160db864217d6bf942a8f.tar.gz ampache-f8c98952aa5a8a30a50160db864217d6bf942a8f.tar.bz2 ampache-f8c98952aa5a8a30a50160db864217d6bf942a8f.zip |
fixed now playing, hopefully once and for all, added title text to the now playing username that displays the agent they are using to play said song, added distinct sessions and session lengths for each stream instance
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r-- | lib/class/update.class.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php index bd1be7af..2af04264 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -215,6 +215,11 @@ class Update { $version[] = array('version' => '340006','description' => $update_string); + $update_string = '- Added new session_stream table for sessions tied directly to stream instances.<br />' . + '- Altered the session table, making value a LONGTEXT.<br />'; + + $version[] = array('version' => '340007','description' => $update_string); + return $version; } // populate_version @@ -807,5 +812,41 @@ class Update { } // update_340006 + /** + * update_340007 + * This update converts the session.value to a longtext + * and adds a session_stream table + */ + public static function update_340007() { + + // Tweak the session table to handle larger session vars for my page-a-nation hotness + $sql = "ALTER TABLE `session` CHANGE `value` `value` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL"; + $db_results = Dba::query($sql); + + // Create the new stream table where we will store stream SIDs + $sql = "CREATE TABLE `session_stream` ( " . + "`id` VARCHAR( 64 ) NOT NULL , " . + "`user` INT( 11 ) UNSIGNED NOT NULL , " . + "`agent` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL , " . + "`expire` INT( 11 ) UNSIGNED NOT NULL , " . + "`ip` INT( 11 ) UNSIGNED NULL , " . + "PRIMARY KEY ( `id` ) " . + ") ENGINE = MYISAM"; + $db_results = Dba::query($sql); + + // Change the now playing to use stream session ids for its ID + $sql = "ALTER TABLE `now_playing` CHANGE `id` `id` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL"; + $db_results = Dba::query($sql); + + // Now longer needed because of the new hotness + $sql = "ALTER TABLE `now_playing` DROP `session`"; + $db_results = Dba::query($sql); + + self::set_version('db_version','340007'); + + return true; + + } // update_340007 + } // end update class ?> |