Services/Sync/Server/Archived/0.5/Setup/Migration

From MozillaWiki
Jump to navigation Jump to search

Full setup instructions

Migrating from Weave Server 0.3 to 0.5

The following changes are required to move from 0.3 to 0.5. These changes are backwards compatible - you can continue to run 0.3 code on the 0.5 database.

You will need to add the Apache alias to enable 0.5:

Alias /0.5 <path to server>/server/0.5/index.php

Alias /user/1 <path to server>/server/user/1/index.php

Alias /misc/1/captcha_html <path to server>/server/misc/1/captcha.php

Constants files

The following three constants files need to be edited:

server/0.5/default_constants.php (This one can be largely copied from the current weave_constants.php file) server/user/1/weave_user_constants.php server/misc/1/weave_misc_constants.php (if using captcha)

Mysql

alter table wbo add column predecessorid varbinary(64) default NULL after parentid;

alter table wbo add column payload_size int;

alter table wbo add index weightindex (`username`,`collection`,`sortindex`);

alter table wbo add index predecessorindex (`username`,`collection`,`predecessorid`);


SQLite

You will need to do this to each user's storage table, so it may be easier to delete and add a user.

alter table wbo add column predecessorid text;

alter table wbo add column payload_size int;

alter table wbo add index weightindex (`username`,`collection`,`sortindex`);