From 6eb6cc94c7926fd3bc0b4dfac4616961e33a9505 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Nov 2018 01:07:31 -0500 Subject: [PATCH] Move config/dbstructure.php to config/dbstructure.config.php --- config/{dbstructure.php => dbstructure.config.php} | 0 src/Database/DBStructure.php | 12 ++++++------ tests/Util/VFSTrait.php | 2 +- update.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) rename config/{dbstructure.php => dbstructure.config.php} (100%) diff --git a/config/dbstructure.php b/config/dbstructure.config.php similarity index 100% rename from config/dbstructure.php rename to config/dbstructure.config.php diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index d4a1ee937f..b5e444020a 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -28,7 +28,7 @@ class DBStructure const UPDATE_FAILED = 2; // Database check failed /** - * Database structure definition loaded from config/dbstructure.php + * Database structure definition loaded from config/dbstructure.config.php * * @var array */ @@ -783,10 +783,10 @@ class DBStructure } /** - * Loads the database structure definition from the config/dbstructure.php file. + * Loads the database structure definition from the config/dbstructure.config.php file. * On first pass, defines DB_UPDATE_VERSION constant. * - * @see config/dbstructure.php + * @see config/dbstructure.config.php * @param boolean $with_addons_structure Whether to tack on addons additional tables * @return array * @throws Exception @@ -796,16 +796,16 @@ class DBStructure if (!self::$definition) { $a = \Friendica\BaseObject::getApp(); - $filename = $a->getBasePath() . '/config/dbstructure.php'; + $filename = $a->getBasePath() . '/config/dbstructure.config.php'; if (!is_readable($filename)) { - throw new Exception('Missing database structure config file config/dbstructure.php'); + throw new Exception('Missing database structure config file config/dbstructure.config.php'); } $definition = require $filename; if (!$definition) { - throw new Exception('Corrupted database structure config file config/dbstructure.php'); + throw new Exception('Corrupted database structure config file config/dbstructure.config.php'); } self::$definition = $definition; diff --git a/tests/Util/VFSTrait.php b/tests/Util/VFSTrait.php index 972119134a..1edc25d424 100644 --- a/tests/Util/VFSTrait.php +++ b/tests/Util/VFSTrait.php @@ -30,7 +30,7 @@ trait VFSTrait $this->setConfigFile('config.ini.php'); $this->setConfigFile('settings.ini.php'); $this->setConfigFile('local.ini.php'); - $this->setConfigFile('dbstructure.php'); + $this->setConfigFile('dbstructure.config.php'); } /** diff --git a/update.php b/update.php index 115f817d79..41b6fa96f2 100644 --- a/update.php +++ b/update.php @@ -21,7 +21,7 @@ require_once 'include/dba.php'; * This function is responsible for doing post update changes to the data * (not the structure) in the database. * - * Database structure changes are done in config/dbstructure.php + * Database structure changes are done in config/dbstructure.config.php * * If there is a need for a post process to a structure change, update this file * by adding a new function at the end with the number of the new DB_UPDATE_VERSION. @@ -33,7 +33,7 @@ require_once 'include/dba.php'; * * 1. Create a function "update_4712()" here in the update.php * 2. Apply the needed structural changes in config/dbStructure.php - * 3. Set DB_UPDATE_VERSION in config/dbstructure.php to 4712. + * 3. Set DB_UPDATE_VERSION in config/dbstructure.config.php to 4712. * * If you need to run a script before the database update, name the function "pre_update_4712()" */