streams/Zotlabs/Update/_1193.php

22 lines
425 B
PHP
Raw Normal View History

<?php
namespace Zotlabs\Update;
2021-12-02 23:02:31 +00:00
class _1193
{
public function run()
{
2021-12-02 23:02:31 +00:00
if (ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
$r1 = q("CREATE INDEX item_uid_unseen ON item (uid, item_unseen)");
} else {
$r1 = q("ALTER TABLE item ADD INDEX uid_item_unseen (uid, item_unseen)");
}
2021-12-03 03:01:39 +00:00
if ($r1) {
2021-12-02 23:02:31 +00:00
return UPDATE_SUCCESS;
2021-12-03 03:01:39 +00:00
}
2021-12-02 23:02:31 +00:00
return UPDATE_FAILED;
}
2021-12-03 03:01:39 +00:00
}