Update public source
This commit is contained in:
+11
-4
@@ -434,6 +434,7 @@ class Database:
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
"handshake_id" in column_names
|
"handshake_id" in column_names
|
||||||
|
and "verified" in column_names
|
||||||
and has_provenance_unique
|
and has_provenance_unique
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
@@ -486,10 +487,16 @@ class Database:
|
|||||||
)
|
)
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
verified_expression = (
|
||||||
|
"verified"
|
||||||
|
if "verified" in column_names
|
||||||
|
else "0"
|
||||||
|
)
|
||||||
|
|
||||||
if "handshake_id" in column_names:
|
if "handshake_id" in column_names:
|
||||||
|
|
||||||
self.conn.execute(
|
self.conn.execute(
|
||||||
"""
|
f"""
|
||||||
INSERT INTO credentials
|
INSERT INTO credentials
|
||||||
(
|
(
|
||||||
id,
|
id,
|
||||||
@@ -507,7 +514,7 @@ class Database:
|
|||||||
password,
|
password,
|
||||||
source,
|
source,
|
||||||
created_at,
|
created_at,
|
||||||
verified
|
{verified_expression}
|
||||||
FROM credentials_old
|
FROM credentials_old
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -515,7 +522,7 @@ class Database:
|
|||||||
else:
|
else:
|
||||||
|
|
||||||
self.conn.execute(
|
self.conn.execute(
|
||||||
"""
|
f"""
|
||||||
INSERT INTO credentials
|
INSERT INTO credentials
|
||||||
(
|
(
|
||||||
id,
|
id,
|
||||||
@@ -531,7 +538,7 @@ class Database:
|
|||||||
password,
|
password,
|
||||||
source,
|
source,
|
||||||
created_at,
|
created_at,
|
||||||
verified
|
{verified_expression}
|
||||||
FROM credentials_old
|
FROM credentials_old
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user