aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql5
-rw-r--r--install/update.php17
2 files changed, 20 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index c92428975..77070027c 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -823,6 +823,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_access` int(11) NOT NULL DEFAULT '0',
`site_flags` int(11) NOT NULL DEFAULT '0',
`site_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `site_sync` datetime NOT NULL,
`site_directory` char(255) NOT NULL DEFAULT '',
`site_register` int(11) NOT NULL DEFAULT '0',
`site_sellpage` char(255) NOT NULL DEFAULT '',
@@ -903,6 +904,7 @@ CREATE TABLE IF NOT EXISTS `updates` (
`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',
+ `ud_last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ud_flags` int(11) NOT NULL DEFAULT '0',
`ud_addr` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`ud_id`),
@@ -910,7 +912,8 @@ CREATE TABLE IF NOT EXISTS `updates` (
KEY `ud_guid` (`ud_guid`),
KEY `ud_date` (`ud_date`),
KEY `ud_flags` (`ud_flags`),
- KEY `ud_addr` (`ud_addr`)
+ KEY `ud_addr` (`ud_addr`),
+ KEY `ud_last` (`ud_last`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `verify` (
diff --git a/install/update.php b/install/update.php
index 13f4fc63b..5c46538cf 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1074 );
+define( 'UPDATE_VERSION' , 1075 );
/**
*
@@ -816,11 +816,13 @@ ADD INDEX ( `ud_addr` ) ");
function update_r1072() {
$r = q("ALTER TABLE `xtag` ADD `xtag_flags` INT NOT NULL DEFAULT '0',
ADD INDEX ( `xtag_flags` ) ");
+
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
function update_r1073() {
$r1 = q("CREATE TABLE IF NOT EXISTS `source` (
`src_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
@@ -836,3 +838,16 @@ function update_r1073() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1074() {
+ $r1 = q("ALTER TABLE `site` ADD `site_sync` DATETIME NOT NULL AFTER `site_update` ");
+
+ $r2 = q("ALTER TABLE `updates` ADD `ud_last` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `ud_date` ,
+ADD INDEX ( `ud_last` ) ");
+
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+