aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql5
-rw-r--r--install/update.php13
2 files changed, 16 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index 817091df5..02bbb5f0f 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -17,6 +17,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
`abook_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_connnected` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `abook_dob` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_flags` int(11) NOT NULL DEFAULT '0',
`abook_profile` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`abook_id`),
@@ -30,7 +31,8 @@ CREATE TABLE IF NOT EXISTS `abook` (
KEY `abook_updated` (`abook_updated`),
KEY `abook_connnected` (`abook_connnected`),
KEY `abook_flags` (`abook_flags`),
- KEY `abook_profile` (`abook_profile`)
+ KEY `abook_profile` (`abook_profile`),
+ KEY `abook_dob` (`abook_dob`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `account` (
@@ -641,6 +643,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
`name` char(255) NOT NULL,
`pdesc` char(255) NOT NULL,
`dob` char(32) NOT NULL DEFAULT '0000-00-00',
+ `dob_tz` char(255) NOT NULL DEFAULT 'UTC',
`address` char(255) NOT NULL,
`locality` char(255) NOT NULL,
`region` char(255) NOT NULL,
diff --git a/install/update.php b/install/update.php
index 4c5e4d3a6..e8f52273e 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1010 );
+define( 'UPDATE_VERSION' , 1011 );
/**
*
@@ -169,3 +169,14 @@ function update_r1009() {
}
+function update_r1010() {
+ $r = q("ALTER TABLE `abook` ADD `abook_dob` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `abook_connnected` ,
+ADD INDEX ( `abook_dob` )");
+
+ $r2 = q("ALTER TABLE `profile` ADD `dob_tz` CHAR( 255 ) NOT NULL DEFAULT 'UTC' AFTER `dob`");
+
+ if($r && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+