Ensure that the IN clause contains one value at least. The idea is avoid a
syntax error in the SQL sentence and rollbacks in the transactions.
For example:
ERROR: syntax error at or near ")"
LINE 1: ...RE ... and team.id IN ();
We will always add the -1 value in the IN list.
If user creates a protect branch for the first time (which has ID=0),
it generates invalid whitelist records with 'protect_branch_id=0'.
This prevents future updates of protect branch whitelist.
Migration: remove existing invalid protect branch whitelist records.