use Friendica\App;
use Friendica\Core\Config;
-require_once("boot.php");
-require_once("include/text.php");
+require_once "boot.php";
+require_once "include/text.php";
define('NEW_UPDATE_ROUTINE_VERSION', 1170);
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
"name" => array("type" => "varchar(128)", "not null" => "1", "default" => ""),
"locked" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
- "created" => array("type" => "datetime", "default" => NULL_DATE),
+ "pid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0"),
),
"indexes" => array(
"PRIMARY" => array("id"),
),
"indexes" => array(
"PRIMARY" => array("id"),
+ "pid" => array("pid"),
+ "parameter" => array("parameter(64)"),
+ "priority_created" => array("priority", "created"),
)
);
unset($db_host, $db_user, $db_pass, $db_data);
}
- if ($argc==2) {
+ if ($argc == 2) {
switch ($argv[1]) {
case "dryrun":
update_structure(true, false);
$build = get_config('system','build');
if (!x($build)) {
- set_config('system','build',DB_UPDATE_VERSION);
+ set_config('system', 'build', DB_UPDATE_VERSION);
$build = DB_UPDATE_VERSION;
}
// run any left update_nnnn functions in update.php
for ($x = $stored; $x < $current; $x ++) {
$r = run_update_function($x);
- if (!$r) break;
+ if (!$r) {
+ break;
+ }
}
set_config('system','build',DB_UPDATE_VERSION);
}
-if (array_search(__file__,get_included_files())===0) {
+if (array_search(__FILE__,get_included_files())===0) {
dbstructure_run($_SERVER["argv"],$_SERVER["argc"]);
killme();
}