| country |
varchar(255) |
|
true |
|
|
|
The country that the user has provided to the system. |
| created_at |
timestamp with time zone |
now() |
false |
|
|
|
Timestamp when the record was created. |
| email |
varchar(255) |
|
false |
|
|
|
User’s email |
| email_communication_consent |
boolean |
false |
false |
|
|
|
Whether user has given consent to receive emails related to MOOC.fi
courses and the development of the learning environment |
| email_search_helper |
text |
|
true |
GENERATED ALWAYS AS lower((COALESCE(email, ’’::character
varying))::text) STORED |
|
|
Generated helper column for typo-resistant full email search in
lowercase. |
| email_verified_at |
timestamp with time zone |
|
true |
|
|
|
When the user last proved control of the address currently in email.
NULL means unproven. Automatically reset to NULL by the
clear_email_verification trigger whenever email changes, so a non-NULL
value always refers to the current address. Never set this without a
proof of mailbox control. |
| email_verified_method |
email_verification_method |
|
true |
|
|
|
How email_verified_at was obtained. The credit-registration
email-match fast track accepts emailed_code, password_reset_backfill and
tmc_confirmed; admin_asserted rests on no mailbox proof and is
refused. |
| first_name |
varchar(255) |
|
true |
|
|
|
The first name that the user has provided to the system. |
| last_name |
varchar(255) |
|
true |
|
|
|
The last name that the user has provided to the system. |
| name_search_helper |
text |
|
true |
GENERATED ALWAYS AS lower(btrim((((((((COALESCE(first_name,
’‘::character varying))::text ||’ ‘::text) ||
(COALESCE(last_name,’‘::character varying))::text) ||’ ‘::text) ||
(COALESCE(last_name,’‘::character varying))::text) ||’ ‘::text) ||
(COALESCE(first_name,’’::character varying))::text))) STORED |
|
|
Generated helper column for typo-resistant user name search.
Contains first-name last-name and last-name first-name in
lowercase. |
| search_helper |
text |
|
true |
GENERATED ALWAYS AS lower(replace((((((((((((user_id)::text || ’
‘::text) || (COALESCE(first_name,’‘::character varying))::text) ||’
‘::text) || (COALESCE(last_name,’‘::character varying))::text) ||’
‘::text) || (COALESCE(last_name,’‘::character varying))::text) ||’
‘::text) || (COALESCE(first_name,’‘::character varying))::text) ||’
‘::text) || (COALESCE(email,’‘::character varying))::text),’ ‘::text,’
’::text)) STORED |
|
|
Helps us to search users with one trigram-indexed column. It
contains user id, email, first-name last-name, and last-name first-name;
both names are intentionally repeated so partial name searches work in
either order. |
| updated_at |
timestamp with time zone |
now() |
false |
|
|
|
Timestamp when the record was last updated. The field is updated
automatically by the set_timestamp trigger. |
| user_id |
uuid |
|
false |
|
|
public.users |
The user this record belongs to. |