[Git][security-tracker-team/security-tracker][fix_987283] Simplify DELETE FROM functions
Anton Gladky (@gladk)
gladk at debian.org
Sat Feb 25 21:46:11 GMT 2023
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20230225/7f41c150/attachment-0001.htm>
More information about the debian-security-tracker-commits
mailing list