X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdbstructure.php;h=083255b8ae87ae4baf9ca612ec43c57500006922;hb=178b7eba1b6fea46b73ddc25dac9e669b8446a7a;hp=f131abe64f13b489621c85114536ce3b3f6524cd;hpb=bf28cc0f754e22cf8c52d017665e32de69208a45;p=friendica.git diff --git a/include/dbstructure.php b/include/dbstructure.php index f131abe64f..083255b8ae 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -120,7 +120,7 @@ function print_structure($database) { } } -function update_structure($verbose, $action) { +function update_structure($verbose, $action, $tables=null, $definition=null) { global $a, $db; $errors = false; @@ -130,7 +130,8 @@ function update_structure($verbose, $action) { // Get the current structure $database = array(); - $tables = q("show tables"); + if (is_null($tables)) + $tables = q("show tables"); foreach ($tables AS $table) { $table = current($table); @@ -139,7 +140,8 @@ function update_structure($verbose, $action) { } // Get the definition - $definition = db_definition(); + if (is_null($definition)) + $definition = db_definition(); // Compare it foreach ($definition AS $name => $structure) { @@ -453,6 +455,7 @@ function db_definition() { "uri-date" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "avatar-date" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "term-date" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), + "last-item" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"), "priority" => array("type" => "tinyint(3)", "not null" => "1", "default" => "0"), "blocked" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"), "readonly" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),