Anton Gladky pushed to branch fix_987283 at Debian Security Tracker / security-tracker
Commits: 0b6fc947 by Anton Gladky at 2023-02-25T22:45:48+01:00 Simplify DELETE FROM functions - - - - - 1 changed file: - lib/python/security_db.py Changes: ===================================== lib/python/security_db.py ===================================== @@ -916,15 +916,10 @@ class DB: else: cleared[0] = True - cursor.execute("DELETE FROM debian_bugs") - cursor.execute("DELETE FROM bugs") - cursor.execute("DELETE FROM package_notes") - cursor.execute("DELETE FROM bugs_notes") - cursor.execute("DELETE FROM bugs_xref") - cursor.execute("DELETE FROM package_notes_nodsa") - cursor.execute("DELETE FROM ignored_packages") - cursor.execute("DELETE FROM removed_packages") - cursor.execute("DELETE FROM next_point_update") + tables = ['debian_bugs', 'bugs', 'package_notes', 'bugs_notes', 'bugs_xref', 'package_notes_nodsa', 'ignored_packages', 'removed_packages', 'next_point_update'] + + for table in tables: + cursor.execute(f"DELETE FROM {table}") # The *_status tables are regenerated anyway, no need to # delete them here. View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/0b6fc947c144ed57f38949cfe9c7cb3bccc48460 -- View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/0b6fc947c144ed57f38949cfe9c7cb3bccc48460 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-security-tracker-commits mailing list debian-security-tracker-commits@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-security-tracker-commits