diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-01 17:06:58 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-01 17:06:58 -0700 |
commit | 3852b5ce7fe83cce93c0826a92c378a589bc8664 (patch) | |
tree | 26b3d216c9f4fb284d64902a593c5b66a31e47ab /install/update.php | |
parent | 1447499776ce07bf48b76435a23de704952e6aa2 (diff) | |
download | volse-hubzilla-3852b5ce7fe83cce93c0826a92c378a589bc8664.tar.gz volse-hubzilla-3852b5ce7fe83cce93c0826a92c378a589bc8664.tar.bz2 volse-hubzilla-3852b5ce7fe83cce93c0826a92c378a589bc8664.zip |
separate objs/things from taxonomy
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index b398711b2..d0ea4d147 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1149 ); +define( 'UPDATE_VERSION' , 1150 ); /** * @@ -1748,3 +1748,31 @@ function update_r1148() { return UPDATE_FAILED; } + +function update_r1149() { + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("ALTER TABLE obj ADD obj_term CHAR( 255 ) NOT NULL DEFAULT '', + ADD obj_url CHAR( 255 ) NOT NULL DEFAULT '', + ADD obj_imgurl CHAR( 255 ) NOT NULL DEFAULT '', + ADD obj_created timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', + ADD obj_edited timestamp NOT NULL DEFAULT '0001-01-01 00:00:00' "); + } + else { + $r1 = q("ALTER TABLE obj ADD obj_term CHAR( 255 ) NOT NULL DEFAULT '', + ADD obj_url CHAR( 255 ) NOT NULL DEFAULT '', + ADD obj_imgurl CHAR( 255 ) NOT NULL DEFAULT '', + ADD obj_created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + ADD obj_edited DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' "); + } + + $r2 = q("create index obj_term on obj ( obj_term ) "); + $r3 = q("create index obj_url on obj ( obj_url ) "); + $r4 = q("create index obj_imgurl on obj ( obj_imgurl ) "); + $r5 = q("create index obj_created on obj ( obj_created ) "); + $r6 = q("create index obj_edited on obj ( obj_edited ) "); + $r = $r1 && $r2 && $r3 && $r4 && $r5 && $r6; + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +}
\ No newline at end of file |