6.0.0-git
2021-01-18

[#9986] Database migration triggered on non-database setup
Summary Database migration triggered on non-database setup
Queue Horde Base
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 2011-04-26 (3555 days ago)
Due
Updated 2011-04-27 (3554 days ago)
Assigned
Resolved 2011-04-26 (3555 days ago)
Milestone
Patch No

History
2011-04-27 11:28:16 Git Commit Comment #4 Reply to this comment
Changes have been made in Git for this ticket:

Fix SQL configuration test (Bug #9986).

  1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/33a12e8a0ac0c45d6ba4b7eb5fbb2c2268a0a9d6
2011-04-27 07:32:14 Thomas Jarosch Comment #3 Reply to this comment
Changes have been made in Git for this ticket:

[jan] Don't check for outdated DB schemas if database support is 
disabled (Bug #9986).
I grepped through the complete code base and found another instance
of the same bug in horde/lib/Block/Metar.php:19

As Horde_Block_Metar is not working without a database anyway, it's 
not worth fixing.

2011-04-26 17:12:16 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
2011-04-26 17:11:40 Git Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

[jan] Don't check for outdated DB schemas if database support is 
disabled (Bug #9986).

  3 files changed, 5 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/6f67450baadec478c586b1e9814477e4dc194db9
2011-04-26 13:34:52 Thomas Jarosch Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Database migration triggered on non-database setup
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
Hello,

I've updated my Kolab devel box to Horde4. The box is running without
a database server. I selected SQL type "none" in the horde prefs.

conf.php contained a "$conf['sql']['phptype'] = 'false' line IIRC.

Later on the LoginTasks for the admin try to trigger a DB upgrade
because of this code in horde/lib/LoginTasks/Task/AdminCheck.php:

         if (!empty($GLOBALS['conf']['sql'])) {
             /* Check for outdated DB schemas. */
             $migration = new Horde_Core_Db_Migration();
             foreach ($migration->apps as $app) {
                 $migrator = $migration->getMigrator($app);
                 if ($migrator->getTargetVersion() > 
$migrator->getCurrentVersion()) {
                     $GLOBALS['notification']->push(_("At least one 
database schema is outdated."), 'horde.warning');
                     Horde::url('admin/config', true, array('app' => 'horde'))
                         ->redirect();
                 }
             }

Should the [none] SQL database type completely remove
the $conf['sql'] key or does the code above need to handle the "false" case?

Cheers,
Thomas

Saved Queries