From dee26f391da59c68a23f8fb960dff9ebd879e916 Mon Sep 17 00:00:00 2001
From: Barry Warsaw
Date: Fri, 18 Mar 2011 15:01:57 -0400
Subject: * Give users a unique, random, immutable user id. * Find users by
 user_id via the user manager. * Extend the repr of users to include the user
 id.

---
 src/mailman/database/mailman.sql | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/mailman/database/mailman.sql')

diff --git a/src/mailman/database/mailman.sql b/src/mailman/database/mailman.sql
index 9d2b015b7..8d5a424a3 100644
--- a/src/mailman/database/mailman.sql
+++ b/src/mailman/database/mailman.sql
@@ -252,10 +252,15 @@ CREATE TABLE user (
         id INTEGER NOT NULL,
         real_name TEXT,
         password TEXT,
+        _user_id TEXT,
         preferences_id INTEGER,
         PRIMARY KEY (id),
-         CONSTRAINT user_preferences_id_fk FOREIGN KEY(preferences_id) REFERENCES preferences (id)
+            CONSTRAINT user_preferences_id_fk
+            FOREIGN KEY(preferences_id)
+            REFERENCES preferences (id)
 );
+CREATE INDEX ix_user_user_id ON user (_user_id);
+
 CREATE TABLE version (
         id INTEGER NOT NULL,
         component TEXT,
-- 
cgit v1.2.3-70-g09d2

