6.0.0-git
2021-01-18

[#7433] scripts/setup.php generates wrong database schema
Summary scripts/setup.php generates wrong database schema
Queue Horde Groupware
Queue Version 1.2
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester horde (at) hauke-m (dot) de
Created 2008-10-05 (4488 days ago)
Due
Updated 2008-10-24 (4469 days ago)
Assigned 2008-10-23 (4470 days ago)
Resolved 2008-10-24 (4469 days ago)
Milestone
Patch No

History
2008-10-24 22:33:49 Jan Schneider Comment #6
Taken from Horde DevelopersHorde Developers
State ⇒ Resolved
Reply to this comment
There was a typo in the schema file, fixed for 1.2.1.
2008-10-24 22:31:32 CVS Commit Comment #5 Reply to this comment
2008-10-23 17:40:38 Jan Schneider Comment #4
Assigned to Jan Schneider
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
This is weird.
2008-10-23 17:15:26 maxime (dot) charpenne (at) univ-avignon (dot) fr Comment #3 Reply to this comment
Did you get an error when installing the database through setup.php?
All fields mentioned in the error message exist in
scripts/sql/create.xml.
Posting here some additional information. I have the same issue with 
my Horde server (missing fields lock_owner and lock_scope in 
horde_locks table, I didn't check the other tables).



I retry an install from scratch to answer to your question. Apache 
server (2.2.3 on a Debian Etch), MySQL server (5.0.32) and PHP 
(5.2.0). Here is a summary:

  - Download horde-webmail-1.2.tar.gz

  - Extract in DocumentRoot

  - chown -R www-data: .

  - cd script; ./setup.php

      (1) Configure database settings

        answer questions, then during step 'Writing main configuration 
file', this error occurs 10 times:

            Notice: Undefined index:  secret_key in 
/nfswebuapv-test/horde-test.univ-avignon.fr/www/lib/Horde.php on line 
359

      Continuing with (2) Create database or tables

        None error occurs, except a warning because I've manually 
created the database ([  WARN  ] Database horde_test3 already exists, 
skipping.)

  - Finally, I've checked horde_locks :

mysql> desc horde_locks;

+-----------------------+--------------+------+-----+---------+-------+

| Field                 | Type         | Null | Key | Default | Extra |

+-----------------------+--------------+------+-----+---------+-------+

| lock_id               | varchar(36)  | NO   | PRI |         |       |

| lock_principal        | varchar(255) | NO   |     |         |       |

| lock_origin_timestamp | int(11)      | NO   |     | 0       |       |

| lock_update_timestamp | int(11)      | NO   |     | 0       |       |

| lock_expiry_timestamp | int(11)      | NO   |     | 0       |       |

| lock_type             | int(11)      | NO   |     | 0       |       |

+-----------------------+--------------+------+-----+---------+-------+

6 rows in set (0.00 sec)



Still missing two fields.
2008-10-19 16:04:35 Jan Schneider State ⇒ No Feedback
 
2008-10-07 13:37:02 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Did you get an error when installing the database through setup.php? 
All fields mentioned in the error message exist in 
scripts/sql/create.xml.
2008-10-06 03:33:43 Chuck Hagenbuch Version ⇒ 1.2
Queue ⇒ Horde Groupware
 
2008-10-05 16:34:17 horde (at) hauke-m (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ scripts/setup.php generates wrong database schema
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
The script at scripts/setup.php in Horde Groupware Webmail Edition 1.2 
generates a wrong database schema.

After making a fresh install for example my horde_locks has no 
attribute lock_owner and lock_scope



This produces this error: Oct 05 17:40:12 HORDE [error] [horde] DB 
Error: no such field: SELECT lock_id, lock_owner, lock_scope, 
lock_principal, lock_origin_timestamp, lock_update_tim

estamp, lock_expiry_timestamp, lock_type FROM horde_locks WHERE 
lock_expiry_timestamp >= 1223221212 AND lock_principal = 
'/nag/hauke@hauke-m.de/hauke@hauke-m

.de.ics' AND lock_scope = 'webdav' [nativecode=1054 ** Unknown column 
'lock_owner' in 'field list'] [pid 21056 on line 536 of 
"/var/www/horde/web/lib/Horde/R

PC/webdav.php"]



After installing the tables from groupware.mysql.sql it works.

This is not the only difference between groupware.mysql.sql and the 
installed tables.

Saved Queries