Give user a sense of the severity, add basic tests
This commit is contained in:
parent
46b97acf95
commit
3640f163fc
2 changed files with 59 additions and 1 deletions
|
|
@ -60,7 +60,10 @@ def are_keys_unique(db: Path, table: str, col: str) -> bool:
|
|||
c.execute(f"SELECT COUNT( DISTINCT CAST({col} AS nvarchar(4000))), COUNT({col}) FROM {table};")
|
||||
results = c.fetchall()[0]
|
||||
conn.close()
|
||||
return bool(results[0] == results[1])
|
||||
res = bool(results[0] == results[1])
|
||||
if not res:
|
||||
print("Unique:", results[0], "All:", results[1])
|
||||
return res
|
||||
|
||||
|
||||
def _list_projects(path: Path) -> list[tuple[str, str]]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue