Fix SQL export to work with the SqliteTableModel