Re: [Postfixadmin-devel] Bug in v3.0 vacation module
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2016-12-22 00:48:32
|
Hello, Am Montag, 19. Dezember 2016 schrieb Ullrich von Bassewitz: > I wasn't able to open a ticket so here is a small diff that fixes a > problem with the vacation module. It references a table column that > seems to have existed in older versions, but does no longer in > version 3. I'm using this package from the web site: > postfixadmin-3.0.fedora.noarch.rpm Which database do you use? MySQL, PostgreSQL or SQLite? (I'd guess PostgreSQL ;-) I'm asking because I'm quite sure [1] your patch broke the vacation module for MySQL users, at least those using strict mode. The "cache" column is a text (not varchar) field which doesn't allow to define a default value, therefore we need to specify a value as long as this column exists. The "cache" field was used by old (MySQL only [2]) versions of vacation.pl (to store what we now have in the vacation_notification table), so the question is how we should continue. The reason why I kept the column is that people out there might still (accidently) use an old vacation.pl together with the new PostfixAdmin. So the possible options are: a) drop the column (and hope that not too many people forgot to update to the new vacation.pl) b) add the column for all database types (yes, that sounds pointless, but would avoid differences in the database structure) c) change VacationHandler so that it only knows and fills the cache column if using a MySQL database Opinions? ;-) Regards, Christian Boltz [1] I know the code good enough to be quite sure ;-)) - but I didn't test it. [2] Back then, we had a MySQL vacation.pl and a PostgreSQL vacation.pl. David then merged both into one, using the PostgreSQL vacation.pl as base. IIRC the PostgreSQL version of vacation.pl never used the cache field, which explains why it doesn't exist in the PostgreSQL database layout. -- > IIRC gab es ÜHER mal so seltsame rechteckige Blöcke mit vielen > einzelnen Blättern aus Zellulosefasern in denen man Rezepte nachlesen > konnte... aber frag' mich jetzt nur nicht, wie die hießen. Du redest doch wohl nicht von ermordeten Bäumen? [>T. Braun und S. Posner] |