On Dec 31, 2014, at 10:14 AM, Ryan Ollos wrote:
> > The 4 "59b" attachments were from the old "Design" wiki attachment directory
> > the "f09" PNG file is from the "WikiStart" wiki attachment directory. (The
> > ones that no longer exist in the 'new' Project after "trac-admin upgrade"
> > was run.)
>
> The only reason it should skip those files is if they aren't referenced in
> the attachments table. Could you print out the contents of the table? If
> using SQLite and you have the sqlite3 command line tool installed, it's
> simply:
>
> $ sqlite3 tracdev/db/trac.db
> sqlite> SELECT type,id,filename FROM attachment;
>
> Also useful would be:
> sqlite> SELECT value FROM system WHERE name='database_version';
Thanks Ryan. Here is the 'sqlite3' output.
Old database:
[root@newtracserver projects.stride]# sqlite3 test_project/db/trac.db
SQLite version 3.6.20
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> SELECT type,id,filename FROM attachment;
wiki|Design|test_project.graffle
wiki|Design|test_project Data Rates 2013-09-16.xlsx
wiki|Design|test_project telem.xls
wiki|Design|test_project-design-datamgmt.graffle
wiki|WikiStart|Screen Shot 2014-12-18 at 10.15.49 AM.png
sqlite> SELECT value FROM system WHERE name='database_version';
26
sqlite> ^D
New database:
[root@newtracserver projects.stride]# cd ../projects
[root@newtracserver projects]# sqlite3 test_project/db/trac.db
SQLite version 3.6.20
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> SELECT type,id,filename FROM attachment;
wiki|Design|test_project.graffle
wiki|Design|test_project Data Rates 2013-09-16.xlsx
wiki|Design|test_project telem.xls
wiki|Design|test_project-design-datamgmt.graffle
wiki|WikiStart|Screen Shot 2014-12-18 at 10.15.49 AM.png
sqlite> SELECT value FROM system WHERE name='database_version';
29
So, this would bear out what you said about them not being referenced.
But then I noticed this:
[root@newtracserver projects]# strings - test_project/db/trac.db | egrep
RFAForm\|RFA_
[[Image(RFA_doc.png)]]
[[Image(RFA_ticket.png)]]
Use [attachment:RFAForm.doc] or [wiki:PeerReviews/PeerReviewsHelp#rfas Create
Trac RFA Tickets]
Clearly there are references to these files (which only exist in the
attachments/wiki tree) inside the database; even if they are not "in
the database" if you know what I mean.
So I went to the "PeerReviews" page and I see two "paper clip" images.
Hovering over them with the mouse shows links to the "missing PNG files
down at the bottom of the browser; but it also causes pop-ups saying
No image "RFA_doc.png" attached to
PeerReviews/PeerReviewsHelp
No image "RFA_ticket.png" attached to
PeerReviews/PeerReviewsHelp
So obviously that explains the behavior I'm seeing.
But now we have a problem; clearly in this Template page there is a
'placeholder' for the attached image, but because it's not attached,
"trac-admin upgrade" won't drag it along for the ride.
So unless the user (who is on vacation right now, unfortunately) goes
back and attaches all of these images/docs (on 16 sets of Projects!),
they won't be available in the new 1.0.2 server environment to re-attach
them later.
Maybe "trac-admin upgrade" could be given an option to migrate any
attachments that are not directly attached in the database? Kind
of a "Trust me, I know what I'm doing here" switch?
Happy New Year,
- Greg
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.