On Thursday, April 20, 2017 at 5:20:40 AM UTC-7, Florian Berger wrote: > > On 11.04.2017 10:51, Florian Berger wrote: > > I have found sqldiff [1] which is an official SQLite tool to diff and > > merge tables. > > > > [1] https://www.sqlite.org/sqldiff.html > > I have tested sqldiff in the following bash script: > > > for i in 'milestone' 'ticket' 'ticket_change' 'ticket_custom' \ > 'cache' ; > do > sqlite3-diff --table "${i}" OLD.db NEW.db >> update.sql ; > done ; > > sqlite3 -batch -init update.sql OLD.db '.exit' ; > > This produces an SQL script to record the changes done between OLD.db > and NEW.db in the tables 'milestone', 'ticket', 'ticket_change', > 'ticket_custom', and 'cache'. It then applies those changes to the > original database. > > I've just tried that by adding, editing and closing some tickets and > adding and editing some milestones offline, and the applying the > differences to the live database. So far everything seems to work after > that. > > I have manually examined the SQL script produced to only allow through > the edits that make sense, i.e. I do not want to roll back unrelated > changes that others did to the live database. > > Are there any no-nos in that procedure (apart from obvious possible > editing conflicts, conflicting ticket numbering etc.), or something I am > missing that might impact the consistency of the live Trac instance? >
You probably don't need to worry about cache. The old_value field stores a comment number which is important for threaded replies. You might have some trouble with that. https://trac.edgewall.org/wiki/TracDev/DatabaseSchema/TicketSystem#Tableticket_change If you are willing to keep experimenting to find the corner cases that cause problems, and always make a backups, then it might work okay. - Ryan -- 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 https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
