2018-02-16 20:42:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Update;
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class _1004
|
|
|
|
{
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
$r = q("CREATE TABLE if not exists `site` (
|
2018-02-16 20:42:02 +00:00
|
|
|
`site_url` CHAR( 255 ) NOT NULL ,
|
|
|
|
`site_flags` INT NOT NULL DEFAULT '0',
|
|
|
|
`site_update` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
|
|
|
|
`site_directory` CHAR( 255 ) NOT NULL DEFAULT '',
|
|
|
|
PRIMARY KEY ( `site_url` )
|
|
|
|
) ENGINE = MYISAM DEFAULT CHARSET=utf8");
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
$r2 = q("alter table site add index (site_flags), add index (site_update), add index (site_directory) ");
|
2018-02-16 20:42:02 +00:00
|
|
|
|
2021-12-03 03:01:39 +00:00
|
|
|
if ($r && $r2) {
|
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;
|
|
|
|
}
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|