mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Ignore reference_id when deleting duplicate rows
This commit is contained in:
parent
5f2a74893a
commit
5b5c4d1a8b
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ def import_tautulli_db(database=None, method=None, backup=False):
|
||||||
|
|
||||||
if method == 'merge':
|
if method == 'merge':
|
||||||
for table_name, columns in sorted(table_columns.items()):
|
for table_name, columns in sorted(table_columns.items()):
|
||||||
duplicate_columns = ', '.join([c for c in columns if c != 'id'])
|
duplicate_columns = ', '.join([c for c in columns if c not in ('id', 'reference_id')])
|
||||||
logger.info("Tautulli Database :: Removing duplicate rows from database table '%s'.", table_name)
|
logger.info("Tautulli Database :: Removing duplicate rows from database table '%s'.", table_name)
|
||||||
if table_name in session_history_tables[1:]:
|
if table_name in session_history_tables[1:]:
|
||||||
db.action('DELETE FROM {table} WHERE id NOT IN '
|
db.action('DELETE FROM {table} WHERE id NOT IN '
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue