diff options
author | zotlabs <mike@macgirvin.com> | 2018-03-06 15:31:45 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-03-06 15:31:45 -0800 |
commit | f0f58dade886d88fc178b78c04e1a4067ddfda04 (patch) | |
tree | ca3aa0a51e9cb07bb217419d50aa8e84d96a1104 /Zotlabs | |
parent | b282e45a02c9c5855fe67bf5723c5f443245c3fd (diff) | |
download | volse-hubzilla-f0f58dade886d88fc178b78c04e1a4067ddfda04.tar.gz volse-hubzilla-f0f58dade886d88fc178b78c04e1a4067ddfda04.tar.bz2 volse-hubzilla-f0f58dade886d88fc178b78c04e1a4067ddfda04.zip |
federated polls: add poll_author which will be necessary for Diaspora federation
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Update/_1208.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1208.php b/Zotlabs/Update/_1208.php new file mode 100644 index 000000000..4cbcf4322 --- /dev/null +++ b/Zotlabs/Update/_1208.php @@ -0,0 +1,26 @@ +<?php + +namespace Zotlabs\Update; + +class _1208 { + + function run() { + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("ALTER TABLE poll ADD poll_author text NOT NULL"); + $r2 = q("create index \"poll_author_idx\" on poll \"poll_author\""); + + $r = ($r1 && $r2); + } + else { + $r = q("ALTER TABLE `poll` ADD `poll_author` VARCHAR(191) NOT NULL AFTER `poll_votes`, + ADD INDEX `poll_author` (`poll_author`)"); + } + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + + } + +} |