2019-09-11 02:31:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Update;
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class _1235
|
|
|
|
{
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function run()
|
|
|
|
{
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
$r = q("ALTER TABLE item add replyto text NOT NULL DEFAULT ''");
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
if ($r) {
|
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;
|
|
|
|
}
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function verify()
|
|
|
|
{
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
$columns = db_columns('item');
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
if (in_array('replyto', $columns)) {
|
|
|
|
return true;
|
|
|
|
}
|
2019-09-11 02:31:08 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
return false;
|
|
|
|
}
|
2019-09-11 02:31:08 +00:00
|
|
|
}
|