Hi,

I had to fix the "logs.db" database to be able to have the history
working with gajim 0.16.11 so I am pasting some info below in case
someone else needs it.

The error I was getting was like:

  The database file (/home/ao2/.local/share/gajim/logs.db) cannot be
  read. Try to repair it (see
  https://dev.gajim.org/gajim/gajim/wikis/help/DatabaseBackup) or remove
  it (all history will be lost).

However the pointed wiki page only gave instructions about backing up
the database, not about repairing it. So, some SQL dance was necessary.

See the attached script, you might have to slightly change it to make
it work according to what previous version of gajim you were using
before, I had 0.16.8-5 but I am not sure if the misspelled
"additinal_data" column was there from some version from git I might
have run at some point.

Make sure you have run the instructions on the wiki to backup the
_original_ database, just to have a safety net:

  $ sqlite3 ~/.local/share/gajim/logs.db .dump > backup.sql
  $ mv ~/.local/share/gajim/logs.db ~/.local/share/gajim/logs.db.old

You might have to remove any new database created only
with the new version (rm -i ~/.local/share/gajim/logs.db).

Restore the backup and repair the database:

  $ sqlite3 ~/.local/share/gajim/logs.db < backup.sql
  $ sqlite3 ~/.local/share/gajim/logs.db < 
gajim_0.16.8_fix_logs_table_for_0.16.11.sql

Start gajim.

Keep in mind that you have to select a contact first to be able
to see the logs history.

Ciao,
   Antonio

-- 
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

Attachment: gajim_0.16.8_fix_logs_table_for_0.16.11.sql
Description: application/sql

Reply via email to