<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 29/09/2020 08:09, Lieven De
Puysseleir wrote:<br>
</div>
<blockquote type="cite"
cite="mid:WM!14faacac2ede7bc8cb6a048347eeead2dad22ca454275c96c1b51fd255555d90c16c44b1f6bccde848615249e7911dba!@mx.jul.es">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div>Hello Jules,</div>
<div>Indeed I did find out that the cronjob did just that and
I executed it manually.</div>
<div>What strikes me a bit odd is the way the schema is
printed after the change. On one machine, I got this schema
after the cleanup run:</div>
<div><br>
</div>
<div>
<pre class="gmail-aLF-aPX-K0-aPE">sqlite> .schema dropoff
CREATE TABLE dropoff (
claimID character varying(16) not null,
claimPasscode character varying(16),
authorizedUser character varying(16),
senderName character varying(32) not null,
senderOrganization character varying(32),
senderEmail text not null,
senderIP character varying(255) not null,
confirmDelivery boolean default FALSE,
created timestamp with time zone not null,
note text
, lifeseconds int NOT NULL DEFAULT 0, subject character varying(500) DEFAULT NULL);
CREATE INDEX dropoff_claimID_index ON dropoff(claimID);
=> there seems to be a missing newline and another newline is before the ', lifeseconds". That doesn't seem to hamper with the functionality of zendto in this case
</pre>
<pre class="gmail-aLF-aPX-K0-aPE">=> I had another system following the same update version path which didn't have the strange output of the dropoff schema BUT in that case, there was the previously posted error when making a dropoff and that's the system where I ran the manually changed export-import of the sqlite db.
</pre>
</div>
</div>
</div>
</blockquote>
I think that output is just a quirk of SQLite. I've often seen it
myself too, but it appears to have no effects on the operation of
the table. It just appears to put the newline before the comma
rather than after.<br>
<br>
<blockquote type="cite"
cite="mid:WM!14faacac2ede7bc8cb6a048347eeead2dad22ca454275c96c1b51fd255555d90c16c44b1f6bccde848615249e7911dba!@mx.jul.es">
<div dir="ltr">
<div dir="ltr">
<div>
<pre class="gmail-aLF-aPX-K0-aPE">This is the output from the cleanup script, nothing is mentioned on the change of the schema however it could be the case that the cronjob of cleanup got there before I ran it manually:
#> /usr/bin/php /opt/zendto/sbin/cleanup.php /opt/zendto/config/preferences.php
Cleanup of ZendTo for preference file:
/opt/zendto/config/preferences.php
Updating database schema
Gathering expired dropoffs
- Removing [<CLAIMID>] <USER> <NAME> <<User.Name>@<address.example>>
NSSDropbox Warn recipients about dropoffs close to expiry.
Purging orphaned dropoffs:
No orphans found.
Purging old sender verification data:
Purging old request data:</pre>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Sep 28, 2020 at 6:12
PM Jules <<a href="mailto:Jules@zend.to"
moz-do-not-send="true">Jules@zend.to</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> To manually run the DB schema update, run<br>
/opt/zendto/sbin/cleanup.php<br>
as root. The output of that should tell you what it's doing.<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div>On 28/09/2020 14:21, Lieven De Puysseleir via ZendTo
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Dear,</div>
<div>On one system running zendto 5.17-6 I fail to have
the sqlite3 schema updating while upgrading to 6.05-4.</div>
<div>to update I use the zendto repository on sles 15
sp2 and then run the script that handles config file
changes.</div>
<div><br>
</div>
<div>after the update, it's impossible to make dropoffs
"unable to add a dropoff record to the database". I
notice that there are 2 fields missing from the
dropoff table: "lifeseconds and subject"<br>
</div>
<div><br>
</div>
<div>So I deleted the file zendto.sqlite, restarted
apache2 and zendto created a new one with the correct
schema. <br>
</div>
<div>Next, I did a dump of the old db to file, found the
INSERT lines for the dropoff table and added a value
for the lifeseconds which (I think) corresponds to the
max 14days we put as preference when it's not
overridden in the new version dropoff form. Also added
a value empty string '' for the subject field.</div>
<div>Lastly I did a cat of the (edited) dump file, piped
it to sqlite3 into the newly created empty db file.</div>
<div>This seemed to work fine, I could see the dropoffs
in the interface but couldn't see the files when I
opened a dropoff.</div>
<div>I verified that for each dropoff line in the
database, the claimid corresponded to the name of the
folder in /var/zendto where the dropoff
directory/files resided and it matched.</div>
<div>The logs don't say anything about this.</div>
<div>Apache logs indicate that pickup.php is used but
again, the php code with the nssdrop class stuff is
something I can't seem to understand how it works. (or
if it even matters in this case)<br>
</div>
<div><br>
</div>
<div>This worked fine on another system upgrading 5.17-6
to 6.05-4. The update was done with zypper, the
upgrade script run and that was it, everything looked
fine in the dropoffs.<br>
</div>
<div><br>
</div>
<div>Any ideas what part of the install script I should
run to simulate the schema upgrade? I've been looking
into cleanup.php but I'm not much of a programmer and
can't figure how it actually works by calling some
class or something. (I'm probably wrong here)</div>
<div><br>
</div>
<div>Thanks for your help.<br>
</div>
<div><br>
-- <br>
<div dir="ltr">Lieven<br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
ZendTo mailing list
<a href="mailto:ZendTo@zend.to" target="_blank" moz-do-not-send="true">ZendTo@zend.to</a>
<a href="http://jul.es/mailman/listinfo/zendto" target="_blank" moz-do-not-send="true">http://jul.es/mailman/listinfo/zendto</a>
</pre>
</blockquote>
<br>
<pre cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
The current UK shipping forecast:
East Forties: Cyclonic becoming northerly 4 or 5. Slight or moderate. Rain,
fog patches. Moderate or very poor.
<a href="http://www.Zend.To" target="_blank" moz-do-not-send="true">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</div>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail_signature">Lieven De Puysseleir</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
'A committee is a group of the unwilling, chosen from the unfit,
to do the unnecessary.' - Anon
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</body>
</html>