Package: php-horde-db
Version: 2.4.0-3

When trying to do the post-install setup of "php-horde-groupware"
(version 5.2.22-3) on Debian 10 (buster) with "postgresql" (version
11+200+deb10u4), /usr/bin/groupware-install fails (this seems to be a
variant of #880380):
------------------------------ 8< ------------------------------
# groupware-install
[…]
Should Horde log all queries. If selected, queries will be logged at
the DEBUG level to your configured logger.
    (1) Yes
    (0) No

Type your choice [0]: 1

Writing main configuration file... done.

Creating and updating database tables...
  Fatal Error:
  SQLSTATE[42703]: Undefined column: 7 ERROR:  column "increment_by"
does not exist
  LINE 1: ..._seq', (SELECT COALESCE(MAX("share_id") + (SELECT increment_...
                                                               ^
  In /usr/share/php/Horde/Db/Adapter/Pdo/Base.php on line 233

   1. Horde_Core_Bundle->migrateDb() /usr/bin/groupware-install:32
   2. Horde_Db_Migration_Migrator->up() /usr/share/php/Horde/Core/Bundle.php:107
   3. Horde_Db_Migration_Migrator->_doMigrate()
/usr/share/php/Horde/Db/Migration/Migrator.php:102
   4. Horde_Db_Migration_Base->migrate()
/usr/share/php/Horde/Db/Migration/Migrator.php:182
   5. KronolithUpgradeAutoIncrement->up()
/usr/share/php/Horde/Db/Migration/Base.php:121
   6. Horde_Db_Migration_Base->__call()
/usr/share/horde/kronolith/migration/2_kronolith_upgrade_autoincrement.php:22
   7. Horde_Db_Adapter_Base->__call()
/usr/share/php/Horde/Db/Migration/Base.php:86
   8. Horde_Db_Adapter_Postgresql_Schema->changeColumn()
/usr/share/php/Horde/Db/Adapter/Base.php:274
   9. Horde_Db_Adapter_Postgresql_Schema->resetPkSequence()
/usr/share/php/Horde/Db/Adapter/Postgresql/Schema.php:563
  10. Horde_Db_Adapter_Base_Schema->__call()
/usr/share/php/Horde/Db/Adapter/Postgresql/Schema.php:1067
  11. Horde_Db_Adapter_Pdo_Base->selectValue()
/usr/share/php/Horde/Db/Adapter/Base/Schema.php:166
  12. Horde_Db_Adapter_Pdo_Base->execute()
/usr/share/php/Horde/Db/Adapter/Pdo/Base.php:151
  13. Horde_Core_Bundle->migrateDb() /usr/bin/groupware-install:32
  14. Horde_Db_Migration_Migrator->up() /usr/share/php/Horde/Core/Bundle.php:107
  15. Horde_Db_Migration_Migrator->_doMigrate()
/usr/share/php/Horde/Db/Migration/Migrator.php:102
  16. Horde_Db_Migration_Base->migrate()
/usr/share/php/Horde/Db/Migration/Migrator.php:182
  17. KronolithUpgradeAutoIncrement->up()
/usr/share/php/Horde/Db/Migration/Base.php:121
  18. Horde_Db_Migration_Base->__call()
/usr/share/horde/kronolith/migration/2_kronolith_upgrade_autoincrement.php:22
  19. Horde_Db_Adapter_Base->__call()
/usr/share/php/Horde/Db/Migration/Base.php:86
  20. Horde_Db_Adapter_Postgresql_Schema->changeColumn()
/usr/share/php/Horde/Db/Adapter/Base.php:274
  21. Horde_Db_Adapter_Postgresql_Schema->resetPkSequence()
/usr/share/php/Horde/Db/Adapter/Postgresql/Schema.php:563
  22. Horde_Db_Adapter_Base_Schema->__call()
/usr/share/php/Horde/Db/Adapter/Postgresql/Schema.php:1067
  23. Horde_Db_Adapter_Pdo_Base->selectValue()
/usr/share/php/Horde/Db/Adapter/Base/Schema.php:166
  24. Horde_Db_Adapter_Pdo_Base->execute()
/usr/share/php/Horde/Db/Adapter/Pdo/Base.php:151
  25. PDO->query() /usr/share/php/Horde/Db/Adapter/Pdo/Base.php:233
------------------------------ >8 ------------------------------

After applying the patch from https://github.com/horde/Db/pull/3/files
to /usr/share/php/Horde/Db/Adapter/Postgresql/Schema.php (belonging to
the package "php-horde-db", hence this bugreport), groupware-install
succeeds.


How to reproduce:

1. Prepare postgresql:
------------------------------ 8< ------------------------------
# apt install postgresql postgresql-client
# su - postgres
> createuser --pwprompt horde
> createdb -O horde horde
(Test with:)
> psql -h localhost -d horde -U horde
------------------------------ >8 ------------------------------

2. Install horde packages:
------------------------------ 8< ------------------------------
# aptitude install php-horde-groupware php-pgsql
------------------------------ >8 ------------------------------

3. Run groupware-install (as described in https://wiki.debian.org/Horde)
------------------------------ 8< ------------------------------
# groupware-install

Installing Horde Groupware

Configuring database settings

What database backend should we use?
    (false) [None]
    (mysql) MySQL / PDO
    (mysqli) MySQL (mysqli)
    (oci8) Oracle
    (pgsql) PostgreSQL
    (sqlite) SQLite

Type your choice []: pgsql

Username to connect to the database as* [] horde
Password to connect with
How should we connect to the database?
    (unix) UNIX Sockets
    (tcp) TCP/IP

Type your choice [unix]: tcp

Database server/host* [] localhost

Port the DB is running on, if non-standard

Database name to use* [] horde

Internally used charset* [utf-8]
Split reads to a different server?
    (false) Disabled
    (true) Enabled

Type your choice [false]:
Should Horde log all queries. If selected, queries will be logged at
the DEBUG level to your configured logger.
    (1) Yes
    (0) No

Type your choice [0]: 1

Writing main configuration file... done.

Creating and updating database tables...
  Fatal Error:
  SQLSTATE[42703]: Undefined column: 7 ERROR:  column "increment_by"
does not exist
  LINE 1: ..._seq', (SELECT COALESCE(MAX("share_id") + (SELECT increment_...
                                                               ^
  In /usr/share/php/Horde/Db/Adapter/Pdo/Base.php on line 233
[see above for full traceback]
------------------------------ >8 ------------------------------


-- 
Mit freundlichen Grüßen
   Christopher 'm4z' Holm

"We must respect the other fellow's religion, but only in the sense
and to the extent that we respect his theory that his wife is
beautiful and his children smart." --H. L. Mencken

Reply via email to