After I upgraded my Weave server to API version 1.0, syncing my bookmarks between browsers no longer worked alright. At first, I didn’t really notice because Weave Sync still seemed to work but just not — well, just not always. Fuzzy symptoms that kept me from investigating for some time.
Then, almost by accident, I noticed Jason Frisvold’s post on the mozilla-labs-weave group. He describes exactly the same problems I was having and points to the solution: when I upgraded the user API database table I missed the necessary changes to the WBO table. Most notably, the column containing the modification time of an object has been changed from
`modified` decimal(12,2) DEFAULT NULL
`modified` bigint(20) DEFAULT NULL
This resulted in all my bookmark records having a modification time of 9999999999.99 which explains why the syncing would no longer work as expected.
For about half a year I have been using the Mozilla Weave Sync plug-in to synchronize the Firefox data from various systems with my own Weave server. Updating the plug-in during this time has been no problem at all, except getting used to the repeated complete UI overhauls.
Keeping the server component updated, or even knowing when such an updated was required by a new version of the plug-in was not quite as easy. After my recent upgrade to the first beta release 1.0b1 of the plug-in, the sync process failed again, indicating that an upgrade of the server might be needed.
On the server side, the directory and URL layout has been changed, making it somewhat clearer now. I gathered the necessary changes from the Mozilla Labs wiki, from the pages describing the setup of the sync and user service.
The sync would still not work at this point, but now I could see why in the server’s error log: for the MySQL table users, the column username no longer was the primary key. Instead, the developers added a synthetic primary key id to the table. Simply dropping the old key and creating the new one helped to get my weave server up and running again:
ALTER TABLE users DROP PRIMARY KEY;
ALTER TABLE users ADD COLUMN id int(11) NOT NULL PRIMARY KEY auto_increment;