diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-10-14 23:07:42 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-10-14 23:07:42 +0200 |
commit | e2ae8f0c4d83060b2606f03b1c86d040c3161f18 (patch) | |
tree | ed044c27276a661dc55d0b102b66feb9ffad489b /Zotlabs/Lib | |
parent | 074dc440cc1447493694181cce95cb336476eda3 (diff) | |
download | volse-hubzilla-e2ae8f0c4d83060b2606f03b1c86d040c3161f18.tar.gz volse-hubzilla-e2ae8f0c4d83060b2606f03b1c86d040c3161f18.tar.bz2 volse-hubzilla-e2ae8f0c4d83060b2606f03b1c86d040c3161f18.zip |
Zotlabs\Lib\DB_Upgrade: Add API documentation.
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/DB_Upgrade.php | 23 |
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); |