summaryrefslogtreecommitdiffstats
path: root/lib/class/update.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r--lib/class/update.class.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 130ed2c6..9a6be243 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -253,6 +253,10 @@ class Update {
$version[] = array('version' => '340013','description'=>$update_string);
+ $update_string = '- Removed API Session table, been a nice run....<br />' .
+ '- Alterted Session table to handle API sessions correctly.<br />';
+
+ $version[] = array('version' => '340014','description'=>$update_string);
return $version;
@@ -1079,5 +1083,30 @@ class Update {
} // update_340013
+ /**
+ * update_340014
+ * This update drops the session_api table that I added just two updates ago
+ * it's been nice while it lasted but it's time to pack your stuff and GTFO
+ * at the same time it updates the core session table to handle the additional
+ * stuff we're going to ask it to do.
+ */
+ public static function update_340014() {
+
+ $sql = "DROP TABLE `session_api`";
+ $db_results = Dba::query($sql);
+
+ $sql = "ALTER TABLE `session` CHANGE `type` `type` ENUM ('mysql','ldap','http','api','xml-rpc') NOT NULL";
+ $db_results = Dba::query($sql);
+
+ $sql = "ALTER TABLE `session` ADD `agent` VARCHAR ( 255 ) NOT NULL AFTER `type`";
+ $db_results = Dba::query($sql);
+
+ $sql = "ALTER TABLE `session` ADD INDEX (`type`)";
+ $db_results = Dba::query($sql);
+
+ self::set_version('db_version','340014');
+
+ } // update_340014
+
} // end update class
?>