RoundCube Upgrade 問題

閣下如果用緊RoundCube嚟做webmail,已經存在一個database(唔理係PostgreSQL定MySQL)。喺Upgrade、重新安裝、遷移時候,可能會面對Database唔兼容嘅問題。表面好似無咩事,但係到send mail嘅時候就出事啦,你會發覺啲身份無嗮!

好,先講講原因,梗係database schema唔同咗啦。無錯,唔只有幾個table多咗一個field,仲多咗幾個table添。咁點搞?好簡單,一個道理,搵出唔同嘅地方,知道後就住新嘅schema嚟insert翻啲record入去。大家可以參考一下以下嘅SQL,假設你個舊database係backuproundcube,咁login去新database,做以下工作試試:

insert into users select * from backuproundcube.users;

insert into identities
select identity_id, user_id, null as changed, del, standard, name, organization, email, "reply-to",
bcc, signature, html_signature
from backuproundcube.identities;

insert into contacts
select contact_id, changed, del, name, email, firstname, surname, vcard, null as words, user_id
from backuproundcube.contacts;