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?

Cheers,

    Florian

-- 
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.

Reply via email to