Skip to content

Commit

Permalink
fix(migration): Do not emit log output for checker_id normalisation
Browse files Browse the repository at this point in the history
In case a new product is added to an empty sever, what happens in the
background is a full "migration" from the "empty" state to the newest
schema, which results in the log output that is removed by this patch on
the standard output of the server.

These lines are not directly needed, but there is no good reason to hide
them behind an `if len(...):` check either. In case actual rows are
migrated (which never happens when a new product is added to the
server), the appropriate output showing the row count of the `UPDATE`
statement will be printed to the output normally.
  • Loading branch information
whisperity committed Mar 25, 2024
1 parent 3cfb1c2 commit 7616c2d
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ def normalise_report_analyzer_and_checker_names():
# These values are normalised such that in the following, when the
# foreign key-based look-up is added to the schema, their new
# 'checker_id' will all point to the single "UNKNOWN/NOT FOUND" case.
LOG.info("Normalising unknowns in 'reports'.'analyzer_name' and "
"'reports'.'checker_id'...")

analyzer_name_affected = conn.execute(f"""
UPDATE reports
SET analyzer_name = '{UnknownChecker[0]}'
Expand Down

0 comments on commit 7616c2d

Please sign in to comment.