diff schema/manage_users.sql @ 233:531d1f8a2b4b

Fix spelling
author Tom Gottfried <tom@intevation.de>
date Thu, 26 Jul 2018 15:02:19 +0200
parents 4859aa6c96be
children 946baea3d280
line wrap: on
line diff
--- a/schema/manage_users.sql	Thu Jul 26 13:57:08 2018 +0200
+++ b/schema/manage_users.sql	Thu Jul 26 15:02:19 2018 +0200
@@ -9,7 +9,7 @@
        pw varchar,
        country users.user_profiles.country%TYPE,
        map_extent users.user_profiles.map_extent%TYPE,
-       email_adress users.user_profiles.email_adress%TYPE
+       email_address users.user_profiles.email_address%TYPE
     )
     RETURNS void
 AS $$
@@ -20,7 +20,7 @@
             WHERE ra.country = create_user.country;
     END IF;
     INSERT INTO users.user_profiles VALUES (
-        username, country, map_extent, email_adress);
+        username, country, map_extent, email_address);
     EXECUTE format(
         'CREATE ROLE %I IN ROLE %I LOGIN PASSWORD %L', username, userrole, pw);
 END;
@@ -36,7 +36,7 @@
        new_pw varchar,
        new_country users.user_profiles.country%TYPE,
        new_map_extent users.user_profiles.map_extent%TYPE,
-       new_email_adress users.user_profiles.email_adress%TYPE
+       new_email_address users.user_profiles.email_address%TYPE
     )
     RETURNS void
 AS $$
@@ -47,8 +47,8 @@
     cur_username = username;
 
     UPDATE users.user_profiles p
-        SET (username, country, map_extent, email_adress)
-        = (new_username, new_country, new_map_extent, new_email_adress)
+        SET (username, country, map_extent, email_address)
+        = (new_username, new_country, new_map_extent, new_email_address)
         WHERE p.username = cur_username;
 
     IF new_username <> cur_username