Skip to content

Commit 2a82b27

Browse files
authored
Update ssaf_sql.php (#29)
DB schema change firstname -> givenname lastname -> familyname per Submitty/Submitty#8779
1 parent aac7a04 commit 2a82b27

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

student_auto_feed/ssaf_sql.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ class sql {
4545
INSERT INTO users (
4646
user_id,
4747
user_numeric_id,
48-
user_firstname,
49-
user_lastname,
50-
user_preferred_firstname,
48+
user_givenname,
49+
user_familyname,
50+
user_preferred_givenname,
5151
user_email
5252
) VALUES ($1, $2, $3, $4, $5, $6)
5353
ON CONFLICT (user_id) DO UPDATE
5454
SET user_numeric_id=EXCLUDED.user_numeric_id,
55-
user_firstname=EXCLUDED.user_firstname,
56-
user_lastname=EXCLUDED.user_lastname,
57-
user_preferred_firstname=
55+
user_givenname=EXCLUDED.user_givenname,
56+
user_familyname=EXCLUDED.user_familyname,
57+
user_preferred_givenname=
5858
CASE WHEN users.user_updated=FALSE
5959
AND users.instructor_updated=FALSE
60-
AND COALESCE(users.user_preferred_firstname, '')=''
61-
THEN EXCLUDED.user_preferred_firstname
62-
ELSE users.user_preferred_firstname
60+
AND COALESCE(users.user_preferred_givenname, '')=''
61+
THEN EXCLUDED.user_preferred_givenname
62+
ELSE users.user_preferred_givenname
6363
END,
6464
user_email=
6565
CASE WHEN COALESCE(EXCLUDED.user_email, '')<>''

0 commit comments

Comments
 (0)