streams/Code/Update/_1235.php

31 lines
440 B
PHP
Raw Normal View History

2019-09-11 02:31:08 +00:00
<?php
2022-02-16 04:08:28 +00:00
namespace Code\Update;
2019-09-11 02:31:08 +00:00
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
}