projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c58abb
)
Don't include old ssh keys when new ones exist
author
Magnus Hagander
<magnus@hagander.net>
Tue, 21 Aug 2012 10:17:21 +0000
(12:17 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Tue, 21 Aug 2012 10:17:21 +0000
(12:17 +0200)
This would cause a UNIQUE violation on the git server...
sql/community_login.sql
patch
|
blob
|
blame
|
history
diff --git
a/sql/community_login.sql
b/sql/community_login.sql
index cc4bb6a01a9ec27b0326d50aa62400345cc37ec0..fffe79f2241e2fcb44ee8775c7b4832a190eab2e 100644
(file)
--- a/
sql/community_login.sql
+++ b/
sql/community_login.sql
@@
-161,4
+161,6
@@
CREATE OR REPLACE VIEW users_keys AS
users_old.sshkey_last_update
FROM users_old
WHERE users_old.sshkey IS NOT NULL
- AND users_old.sshkey <> ''::text;
+ AND users_old.sshkey <> ''::text
+ AND NOT EXISTS (SELECT * FROM auth_user a WHERE a.username=users_old.userid)
+;