2019-01-14 22:47:05 +00:00
|
|
|
<?php
|
|
|
|
|
2022-02-16 04:08:28 +00:00
|
|
|
namespace Code\Update;
|
2019-01-14 22:47:05 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class _1226
|
|
|
|
{
|
2019-01-14 22:47:05 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function run()
|
|
|
|
{
|
2019-01-14 22:47:05 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
if (ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
|
|
|
|
$r = q("alter table item add item_level bigint NOT NULL DEFAULT '0'");
|
|
|
|
} else {
|
|
|
|
$r = q("alter table item add item_level int(10) NOT NULL DEFAULT 0 ");
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($r) {
|
|
|
|
return UPDATE_SUCCESS;
|
|
|
|
}
|
|
|
|
return UPDATE_FAILED;
|
|
|
|
}
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|