Author |
|
tigertech Newbie
Joined: 21 November 2019
Online Status: Offline Posts: 23
|
Posted: 27 January 2021 at 11:51am | IP Logged
|
|
|
Since upgrading from 8.5.2 to 8.5.3, I've noticed problems with signatures not being saved or used. I tracked this down to a change in where the signatures are stored:
--- webmail-pro-8.5.2/modules/Mail/Classes/Identity.php 2020-10-30 04:16:37.000000000 -0700
+++ webmail-pro-8.5.3/modules/Mail/Classes/Identity.php 2020-12-22 06:11:10.000000000 -0800
@@ -32,6 +32,6 @@
'Email' => array('string', ''),
'FriendlyName' => array('string', '', true),
'UseSignature' => array('bool', false),
- 'Signature' => array('text', ''),
+ 'Signature' => array('mediumblob', ''),
);
There's code in 8.5.3 to automatically move the existing signatures from the old database table to the new, but it only gets run when you login as a superadmin and click the "Create/Update Tables" button, which I didn't realize was necessary for minor updates. Doing that solved the problem.
As a suggestion, the CHANGELOG.txt should specifically mention when a table update is needed. Or, even better, the code should store a value in a database table that says what "version" of database tables have been updated, and check it on each login, then apply the table updates automatically if it's outdated. (This is the way WordPress works, for example.)
Thanks!
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 27 January 2021 at 5:35pm | IP Logged
|
|
|
Actually, WebMail Pro upgrading instructions specifically mention that database update as well as updating configuration is required on any upgrade.
We will consider the suggestion of course, though it only looks feasible when you upgrade from the directly preceeding version which isn't necessarily the case.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
tigertech Newbie
Joined: 21 November 2019
Online Status: Offline Posts: 23
|
Posted: 28 January 2021 at 10:49am | IP Logged
|
|
|
Igor wrote:
Actually, WebMail Pro upgrading instructions specifically mention that database update as well as updating configuration is required on any upgrade. |
|
|
Yep, it was definitely my fault for misreading the instructions; for some reason I thought those were only necessary when doing a more major upgrade. But I would guess that table changes happen so infrequently that adding a quick reminder to the changelog in such a case might avoid support requests from people like me
Igor wrote:
We will consider the suggestion of course, though it only looks feasible when you upgrade from the directly preceeding version which isn't necessarily the case. |
|
|
Well, the way it's done is something like:
$tableversion = GetTableVersionFromDatabase();
if ($tableversion < 2) {
MakeTableVersion2Changes();
StoreTableVersionInDatabase(2);
}
if ($tableversion < 3) {
MakeTableVersion3Changes();
StoreTableVersionInDatabase(3);
}
if ($tableversion < 4) {
MakeTableVersion4Changes();
StoreTableVersionInDatabase(4);
}
That way the code can apply whichever changes are necessary, and you just add new changes to the end. But I suppose then you need locking to prevent more than one copy of this running at the same time, and so on, so it's not really this simple....
|
Back to Top |
|
|