Summary | MDB2_Schema Error: schema validation error |
Queue | Horde Groupware Webmail Edition |
Queue Version | 1.2.2 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | samuel.wolf (at) wolf-maschinenbau (dot) de |
Created | 01/29/2009 (6001 days ago) |
Due | |
Updated | 12/19/2009 (5677 days ago) |
Assigned | 09/16/2009 (5771 days ago) |
Resolved | 12/16/2009 (5680 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | 1.2.5 |
Patch | No |
State ⇒ Resolved
Milestone ⇒ 1.2.5
Bump versions, even MDB2 and MDB2_Schema because this seems to fix
bug #7914.http://cvs.horde.org/diff.php/groupware/config/Attic/pear.txt?rt=horde&r1=1.26.2.8&r2=1.26.2.9&ty=u
date and they intend for them to work... if you delete the
horde_alarms table, you automatically deleted all your users alarms.
You can, however, modify the structure of the table before the upgrade
in order that it completes sucessfully:
ALTER TABLE `horde_alarms` CHANGE `alarm_start` `alarm_start` DATETIME
NOT NULL DEFAULT '0000-00-00 00:00:00'
This will NOT erase the alarms since it only changes the structure of
the table and, actually, it only changes the DEFAULT value (which is
used for newly inserted records and doesn't affect existing records).
Updating database...
[ ERROR! ] Reading the existing table structure failed. Error messages:
MDB2_Schema Error: schema validation error
default value of "alarm_start" is incorrect: "" is not of type "timestamp"
=> delete horde_alarms and the update is successful without any errors.
can relocate pear and then run
actually, since this was a production setup which I didn't actually
know in what state ended, I rolled everything back to 1.2.3, restored
the database, modified the horde_alarms table like this:
ALTER TABLE `horde_alarms` CHANGE `alarm_start` `alarm_start` DATETIME
NOT NULL DEFAULT '0000-00-00 00:00:00'
and then successfully upgraded.
I'll try to simulate the steps you propose in another directory with a
copy of the database but I don't know when I'll have the time (I
already took a whole morning with this).
What I don't know is how to run the setup script "step by step" so I
can relocate pear and then run
./horde/pear/pear -c horde/pear/horde.ini upgrade mdb2_driver_mysql-beta
(it is, actually mysql 5.0).
State ⇒ Feedback
but *before* actually doing the upgrade.
./horde/pear/pear -c horde/pear/horde.ini upgrade mdb2_schema-beta
./horde/pear/pear -c horde/pear/horde.ini upgrade mdb2_driver_mysql-beta
Replace "mysql" with your database system. Which one do you use anyway?
see where it is coming from.
from older upgrades) into 1.2.4:
Running pre-update scripts...
Writing main configuration file
Loading database module...
Updating database...
[ ERROR! ] Reading the existing table structure failed. Error messages:
MDB2_Schema Error: schema validation error
default value of "alarm_start" is incorrect: "" is not of type "timestamp"
Running post-update scripts...
Done updating Horde Groupware Webmail Edition.
I still don't have an indication if the horde_alarms table was updated
and even if the rest of the database was correctly updated... or what
can I do to prevent this from happening (I can restore my backup, but
re-doing the same steps will probably lead to the same error).
State ⇒ Not A Bug
about the database schema (that we ship). Since both are always the
same, no matter from which version you update, it should either
complain for anyone using that Horde version or for no one.
created with 1.0.something and got multiple updates until 1.2.2, I
hope this history explains the situation.
I changed database structure until 1.2.3 update tool got what it
expected so updates was successful now.
If you cannot reproduce this error it may be helpful to update
documentation, so admin has a chance to verify database structure
requirements.
State ⇒ Feedback
Dropping horde_alarms resolved upgrade.
Dropping horde_alarms resolved upgrade.
Assigned to Jan Schneider
State ⇒ Assigned
Milestone ⇒ 1.2.3
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ MDB2_Schema Error: schema validation error
Type ⇒ Bug
Queue ⇒ Horde Groupware Webmail Edition
Type your choice: y
Running pre-update scripts...
Writing main configuration file
Loading database module...
Updating database...
[ ERROR! ] Reading the existing table structure failed. Error messages:
MDB2_Schema Error: schema validation error
default value of "alarm_start" is incorrect: "" is not of type "timestamp"
Running post-update scripts...
Done updating Horde Groupware Webmail Edition.
----> The only way to make the upgrade is deleting the horde_alarms in
the MySQL Database.
Type your choice: y
Running pre-update scripts...
Writing main configuration file
Loading database module...
Updating database...
[ OK ] Successfully updated the global tables.
[ OK ] Successfully updated the tables for Mail (imp).
[ OK ] Successfully updated the tables for Filters (ingo).
[ OK ] Successfully updated the tables for Address Book (turba).
[ OK ] Successfully updated the tables for Calendar (kronolith).
[ OK ] Successfully updated the tables for Tasks (nag).
[ OK ] Successfully updated the tables for Notes (mnemo).
Done updating tables.
Running post-update scripts...
Done updating Horde Groupware Webmail Edition.