Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit 88f6ac0

Browse files
author
Quentin Lux
committed
add history on the IP+USERNAME couple
1 parent 9de3703 commit 88f6ac0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

privacyidea_pam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def _create_table(c):
673673
c.execute("CREATE TABLE IF NOT EXISTS history "
674674
"(user text, rhost text, serial text, error_counter int, "
675675
"last_success timestamp, last_error timestamp)")
676-
c.execute("CREATE UNIQUE INDEX idx_user "
677-
"ON history (user);")
676+
c.execute("CREATE UNIQUE NONCLUSTERED INDEX idx_user "
677+
"ON history (user, rhost);")
678678
except sqlite3.OperationalError:
679679
pass

0 commit comments

Comments
 (0)