aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php2
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php9
3 files changed, 12 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 2f6fda1f0..64d3633cd 100755
--- a/boot.php
+++ b/boot.php
@@ -43,7 +43,7 @@ require_once('include/taxonomy.php');
define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1067 );
+define ( 'DB_UPDATE_VERSION', 1068 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/install/database.sql b/install/database.sql
index ce46149c4..9b1b6cad2 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -883,10 +883,12 @@ CREATE TABLE IF NOT EXISTS `tokens` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `updates` (
+ `ud_id` int(10) unsigned NOT NULL AUTO INCREMENT,
`ud_hash` char(128) NOT NULL,
`ud_guid` char(255) NOT NULL DEFAULT '',
`ud_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- PRIMARY KEY (`ud_hash`),
+ PRIMARY KEY (`ud_id`),
+ KEY `ud_hash` (`ud_hash`),
KEY `ud_guid` (`ud_guid`),
KEY `ud_date` (`ud_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/install/update.php b/install/update.php
index 36a85afec..1b6a2218e 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1067 );
+define( 'UPDATE_VERSION' , 1068 );
/**
*
@@ -775,3 +775,10 @@ ADD INDEX ( `site_access` )");
return UPDATE_FAILED;
}
+function update_r1067() {
+ $r = q("ALTER TABLE `updates` DROP PRIMARY KEY , ADD `ud_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST, ADD INDEX ( `ud_hash` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+