<?php
-define( 'UPDATE_VERSION' , 1156 );
+define( 'UPDATE_VERSION' , 1159 );
/**
*
return UPDATE_FAILED;
}
+function update_1156() {
+ $r = q("ALTER TABLE `photo` ADD `datasize` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `width` ,
+ADD INDEX ( `datasize` ) ");
+
+ if(!$r) return UPDATE_FAILED;
+ return UPDATE_SUCCESS;
+}
+
+function update_1157() {
+ $r = q("CREATE TABLE IF NOT EXISTS `dsprphotoq` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `uid` int(11) NOT NULL,
+ `msg` mediumtext NOT NULL,
+ `attempt` tinyint(4) NOT NULL,
+ PRIMARY KEY (`id`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8"
+ );
+
+ if($r)
+ return UPDATE_SUCCESS;
+
+ return UPDATE_FAILED;
+}
+
+function update_1158() {
+ set_config('system', 'maintenance', 1);
+
+ // Wait for 15 seconds for current requests to
+ // clear before locking up the database
+ sleep(15);
+
+ $r = q("CREATE INDEX event_id ON item(`event-id`)");
+ set_config('system', 'maintenance', 0);
+
+ if($r)
+ return UPDATE_SUCCESS;
+
+ return UPDATE_FAILED;
+}
+