aboutsummaryrefslogtreecommitdiff
path: root/migrations/20240116060938_init_x500s.sql
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-01-16 02:29:25 -0600
committerNathan Ringo <nathan@remexre.com>2024-01-16 02:29:25 -0600
commit1ef9e40795384b1fd9b5bcb0798f7f210068dd1f (patch)
tree94368bec1229237f90587314d0f4125d8f89ab0b /migrations/20240116060938_init_x500s.sql
parented778ab2060c6131caf98231a97873d7ea490d5a (diff)
All the surrounding mechanisms for noticing user X.500s.
Diffstat (limited to 'migrations/20240116060938_init_x500s.sql')
-rw-r--r--migrations/20240116060938_init_x500s.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/migrations/20240116060938_init_x500s.sql b/migrations/20240116060938_init_x500s.sql
index 3d5ca68..adc1a4b 100644
--- a/migrations/20240116060938_init_x500s.sql
+++ b/migrations/20240116060938_init_x500s.sql
@@ -6,8 +6,8 @@ CREATE TABLE IF NOT EXISTS student_x500s
-- In the common case, we can just map users to their X.500s.
CREATE TABLE IF NOT EXISTS uids_to_x500s_clean
- ( uid TEXT NOT NULL
- , x500 TEXT NOT NULL
+ ( uid INTEGER NOT NULL
+ , x500 TEXT NOT NULL
, FOREIGN KEY(x500) REFERENCES student_x500s(x500)
, UNIQUE(uid)
, UNIQUE(x500)
@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS uids_to_x500s_clean
-- all_seen_uids_to_x500s. This lets us get a list of "suspicious tuples" by
-- subtracting uids_to_x500s_clean from all_seen_uids_to_x500s.
CREATE TABLE IF NOT EXISTS all_seen_uids_to_x500s
- ( uid TEXT NOT NULL
- , x500 TEXT NOT NULL
+ ( uid INTEGER NOT NULL
+ , x500 TEXT NOT NULL
, UNIQUE(uid, x500)
);