6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/21/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#12498] SQL Syntax error or access violation updating Horde_History DB schema
*
Your Email Address
*
Spam protection
Enter the letters below:
.___.__ .__..___..__ [__ [__)| | | [__) | [__)|__\ | |
Comment
>>> OK so I am not a MySQL Guru, can someone recommend a MySQL command to >>> try to fix this? >> >> I fixed it with the following steps: >> * horde-db-migrate show Horde_History schema version: 4 and the SQL error. >> * comment out the up function in the following files >> (/usr/share/php/data/Horde_History/migration): >> 5_horde_history_remove_compositeindex.php >> 6_horde_history_fix_botchedindexes.php >> * run horde-db-migrate to update to Horde_History schema version: 6 >> * I use phpmyadmin to delete all indexes in the horde_histories table >> except the "PRIMARY key >> * at last add the indexes with the following commands >> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX >> `index_horde_histories_on_history_action` ( `history_action` ) >> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX >> `index_horde_histories_on_history_ts` ( `history_ts` ) >> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX >> `index_horde_histories_on_history_modseq` ( `history_modseq` ) >> ALTER TABLE `HORDE_DB_NAME`.`horde_histories` ADD INDEX >> `index_horde_histories_on_object_uid` ( `object_uid` ) >> >> I hope this helps. >> > > OK Half of your procedure worked, the SQL part didnt. > > I am not sure exactly how to execute these SQL commands .. I tried > in phpmyadmin, going into the horde_db then navigting in > horde_histories table then clicking on the SQL (Run SQL Query) and > copy paste the commands you provided, I get > > #1064 - You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use > near 'ALTER TABLE `hordedb`.`horde_histories` ADD INDEX > `index_horde_histories_on_hist' at line 2 > > I tried one by one thinking SQL didnt like the back-to-back with > multiple commands in the same query (I know it can do many commands > in one query but...) > > and I got: > > #1072 - Key column 'history_ts' doesn't exist in table > > Not sure how to push these commands in SQL. Can you help ? > Very aprpeciated!
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers