6.0.0-beta1
7/5/25

[#11877] ActiveSync DB Schema Update Error
Summary ActiveSync DB Schema Update Error
Queue Synchronization
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester nimm (at) technikum-wien (dot) at
Created 12/13/2012 (4587 days ago)
Due
Updated 12/27/2012 (4573 days ago)
Assigned 12/13/2012 (4587 days ago)
Resolved 12/27/2012 (4573 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/27/2012 05:30:41 PM Michael Rubinsky State ⇒ Resolved
 
12/27/2012 05:30:34 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 42c8c979783461de9136732a14c686d91118f544
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Dec 27 12:28:25 2012 -0500

     This seems to be required for some RDBMS when migrating.

     When migrating from a previous column definition, and no default is
     given for the current definiation, the previous definition's default
     is used. Must override that with a valid default for the current
     column type.

     Bug: 11877

  .../15_horde_activesync_integerimapuidfield.php    |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/42c8c979783461de9136732a14c686d91118f544
12/27/2012 11:01:38 AM nimm (at) technikum-wien (dot) at Comment #5 Reply to this comment
Going to call this not a bug. WIll reopen if others report similar problems.
Another user reports the same problem on the horde mailing list:
http://lists.horde.org/archives/horde/Week-of-Mon-20121224/045976.html


12/17/2012 02:25:43 PM Michael Rubinsky Comment #4
State ⇒ Not A Bug
Reply to this comment
Going to call this not a bug. WIll reopen if others report similar problems.
12/13/2012 03:51:21 PM nimm (at) technikum-wien (dot) at Comment #3 Reply to this comment
I can't reproduce this. The migration works fine here on MySQL. Can 
you try the following on the MySQL command line and post the results?

DESCRIBE horde_activesync_mailmap;
Hi!
following output:
mysql> DESCRIBE horde_activesync_mailmap;
+---------------+--------------+------+-----+---------+-------+
| Field         | Type         | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| message_uid   | varchar(255) | NO   | MUL |         |       |
| sync_key      | varchar(255) | NO   |     |         |       |
| sync_devid    | varchar(255) | NO   | MUL |         |       |
| sync_folderid | varchar(255) | NO   | MUL |         |       |
| sync_user     | varchar(255) | YES  |     | NULL    |       |
| sync_read     | tinyint(1)   | YES  |     | NULL    |       |
| sync_deleted  | tinyint(1)   | YES  |     | NULL    |       |
| sync_flagged  | tinyint(1)   | YES  |     | NULL    |       |
+---------------+--------------+------+-----+---------+-------+
8 rows in set (0.00 sec)

The problem ist the default ''
when i manually enter
  ALTER TABLE `horde_activesync_mailmap` CHANGE `message_uid` 
`message_uid` int(11);

it works and the new table looks likemysql> DESCRIBE horde_activesync_mailmap;
+---------------+--------------+------+-----+---------+-------+
| Field         | Type         | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| message_uid   | int(11)      | YES  | MUL | NULL    |       |
| sync_key      | varchar(255) | NO   |     |         |       |
| sync_devid    | varchar(255) | NO   | MUL |         |       |
| sync_folderid | varchar(255) | NO   | MUL |         |       |
| sync_user     | varchar(255) | YES  |     | NULL    |       |
| sync_read     | tinyint(1)   | YES  |     | NULL    |       |
| sync_deleted  | tinyint(1)   | YES  |     | NULL    |       |
| sync_flagged  | tinyint(1)   | YES  |     | NULL    |       |
+---------------+--------------+------+-----+---------+-------+
8 rows in set (0.00 sec)


Maybe the problem is a rather old MySQL Version 5.0.45, InnoDB storage 
for this table.


12/13/2012 02:16:03 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Assigned to Michael Rubinsky
Reply to this comment
I can't reproduce this. The migration works fine here on MySQL. Can 
you try the following on the MySQL command line and post the results?

DESCRIBE horde_activesync_mailmap;

12/13/2012 01:11:56 PM nimm (at) technikum-wien (dot) at Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ ActiveSync DB Schema Update Error
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
When upgrading to ActiveSync 2.0.8 or higher the change in the db 
schema leads to the following error in the horde logs when using a 
MySQL Backend

ERR: HORDE [horde] SQL QUERY FAILED: SQLSTATE[42000]: Syntax error or 
access violation: 1067 Invalid default value for 'message_uid'
         ALTER TABLE `horde_activesync_mailmap` CHANGE `message_uid`
           `message_uid` int(11) DEFAULT '' [pid 9525 on line 815 of 
"/usr/share/php/Horde/Db/Adapter/Base.php"]

Best regards,
Alex

Saved Queries