--- conf/dbschema.sql.orig	2005-05-04 04:27:51.000000000 +0200
+++ conf/dbschema.sql	2006-11-11 22:37:01.000000000 +0100
@@ -19,15 +19,16 @@
 	"gecos" character varying(128),
 	"homedir" character varying(256) NOT NULL,
 	"shell" character varying DEFAULT '/bin/bash' NOT NULL,
-	PRIMARY KEY ("username")
+	PRIMARY KEY ("username"),
+	UNIQUE ("uid")
 );
 
 CREATE TABLE "usergroups" (
 	"gid" int4 NOT NULL,
 	"uid" int4 NOT NULL,
 	PRIMARY KEY ("gid", "uid"),
-	CONSTRAINT "ug_gid_fkey" FOREIGN KEY ("gid") REFERENCES "groups"("gid"),
-	CONSTRAINT "ug_uid_fkey" FOREIGN KEY ("uid") REFERENCES "accounts"("uid")
+	CONSTRAINT "ug_gid_fkey" FOREIGN KEY ("gid") REFERENCES "group_table"("gid"),
+	CONSTRAINT "ug_uid_fkey" FOREIGN KEY ("uid") REFERENCES "passwd_table"("uid")
 );
   
 CREATE TABLE "shadow_table" (
