add age to directory profile - requires updating on each birthday and that part is still missing
This commit is contained in:
@@ -941,6 +941,7 @@ CREATE TABLE IF NOT EXISTS `xprof` (
|
||||
`xprof_hash` char(255) NOT NULL,
|
||||
`xprof_desc` char(255) NOT NULL DEFAULT '',
|
||||
`xprof_dob` char(12) NOT NULL DEFAULT '',
|
||||
`xprof_age` tinyint(3) NOT NULL DEFAULT '0',
|
||||
`xprof_gender` char(255) NOT NULL DEFAULT '',
|
||||
`xprof_marital` char(255) NOT NULL DEFAULT '',
|
||||
`xprof_sexual` char(255) NOT NULL DEFAULT '',
|
||||
@@ -952,6 +953,7 @@ CREATE TABLE IF NOT EXISTS `xprof` (
|
||||
PRIMARY KEY (`xprof_hash`),
|
||||
KEY `xprof_desc` (`xprof_desc`),
|
||||
KEY `xprof_dob` (`xprof_dob`),
|
||||
KEY `xprof_age` (`xprof_age`),
|
||||
KEY `xprof_gender` (`xprof_gender`),
|
||||
KEY `xprof_marital` (`xprof_marital`),
|
||||
KEY `xprof_sexual` (`xprof_sexual`),
|
||||
|
||||
+10
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1047 );
|
||||
define( 'UPDATE_VERSION' , 1048 );
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -572,3 +572,12 @@ ADD INDEX ( `term_hash` ) ");
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
function update_r1047() {
|
||||
$r = q("ALTER TABLE `xprof` ADD `xprof_age` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `xprof_hash` ,
|
||||
ADD INDEX ( `xprof_age` ) ");
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user