streams/Zotlabs/Update/_1251.php

36 lines
492 B
PHP
Raw Normal View History

2021-07-27 12:26:47 +00:00
<?php
namespace Zotlabs\Update;
class _1251 {
function run() {
$default = ((ACTIVE_DBTYPE == DBTYPE_POSTGRES) ? " default ''" : '');
2021-07-27 12:26:47 +00:00
q("START TRANSACTION");
$r = q("ALTER TABLE dreport ADD dreport_log text NOT NULL $default");
2021-07-27 12:26:47 +00:00
if ($r) {
q("COMMIT");
return UPDATE_SUCCESS;
}
q("ROLLBACK");
return UPDATE_FAILED;
}
function verify() {
$columns = db_columns('dreport');
if (in_array('dreport_log',$columns)) {
return true;
}
return false;
}
}