2021-07-27 12:26:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Update;
|
|
|
|
|
|
|
|
class _1251 {
|
|
|
|
|
|
|
|
function run() {
|
2021-08-12 20:04:44 +00:00
|
|
|
|
|
|
|
$default = ((ACTIVE_DBTYPE == DBTYPE_POSTGRES) ? " default ''" : '');
|
|
|
|
|
2021-07-27 12:26:47 +00:00
|
|
|
q("START TRANSACTION");
|
2021-08-12 20:04:44 +00:00
|
|
|
$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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|