diff options
Diffstat (limited to 'migrations/20240116060938_init_x500s.sql')
-rw-r--r-- | migrations/20240116060938_init_x500s.sql | 8 |
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) ); |