aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-10-14 23:07:42 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-10-14 23:07:42 +0200
commite2ae8f0c4d83060b2606f03b1c86d040c3161f18 (patch)
treeed044c27276a661dc55d0b102b66feb9ffad489b /Zotlabs
parent074dc440cc1447493694181cce95cb336476eda3 (diff)
downloadvolse-hubzilla-e2ae8f0c4d83060b2606f03b1c86d040c3161f18.tar.gz
volse-hubzilla-e2ae8f0c4d83060b2606f03b1c86d040c3161f18.tar.bz2
volse-hubzilla-e2ae8f0c4d83060b2606f03b1c86d040c3161f18.zip
Zotlabs\Lib\DB_Upgrade: Add API documentation.
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/DB_Upgrade.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/Zotlabs/Lib/DB_Upgrade.php b/Zotlabs/Lib/DB_Upgrade.php
index 7e1016a73..e11c2eb10 100644
--- a/Zotlabs/Lib/DB_Upgrade.php
+++ b/Zotlabs/Lib/DB_Upgrade.php
@@ -1,11 +1,34 @@
<?php
+/**
+ * A class to handle database schema upgrades.
+ *
+ * SPDX-FileCopyrightText: 2024 Hubzilla Community
+ * SPDX-FileContributor: Harald Eilertsen
+ *
+ * SPDX-License-Identifier: MIT
+ */
namespace Zotlabs\Lib;
use Zotlabs\Lib\Config;
+/**
+ * Upgrade the database schema if necessary.
+ *
+ * Compares the currently active database schema version with the version
+ * required for this version of Hubzilla, and performs the upgrade if needed.
+ *
+ * If the difference consists of more than one revision of the schema, each of
+ * the intermediate upgrades are performed in turn.
+ */
class DB_Upgrade {
+ /**
+ * Check the installed and required schema versions and perform the upgrade
+ * if necessary.
+ *
+ * @param int $db_version The required DB schema version.
+ */
public static function run(int $db_revision): void {
$build = Config::Get('system', 'db_version', 0);