 
 ------ Cards, Units, Subjects > Triggers
 
-create trigger update_unit_modified before update on sg_public.unit_version for each row execute procedure sg_private.update_modified_column(); -- TODO comment
-
-create trigger update_subject_modified before update on sg_public.subject_version for each row execute procedure sg_private.update_modified_column();  -- TODO comment
-
-create trigger update_card_modified before update on sg_public.card_version for each row execute procedure sg_private.update_modified_column();  -- TODO comment
-
-create trigger update_card_parameters_modified before update on sg_public.card_parameters for each row execute procedure sg_private.update_modified_column();  -- TODO comment
+create trigger update_unit_modified
+  before update on sg_public.unit_version
+  for each row execute procedure sg_private.update_modified_column(); -- TODO comment
+
+create trigger update_subject_modified
+  before update on sg_public.subject_version
+  for each row execute procedure sg_private.update_modified_column();  -- TODO comment
+
+create trigger update_card_modified
+  before update on sg_public.card_version
+  for each row execute procedure sg_private.update_modified_column();  -- TODO comment
+
+create trigger update_card_parameters_modified
+  before update on sg_public.card_parameters
+  for each row execute procedure sg_private.update_modified_column();  -- TODO comment
 
 ------ Cards, Units, Subjects > Capabilities (TODO)
 


------ User Subjects, Responses > Triggers

create trigger update_user_subject_modified before update on sg_public.user_subject for each row execute procedure sg_private.update_modified_column();
-- todo comment

create trigger update_response_modified before update on sg_public.response for each row execute procedure sg_private.update_modified_column();
-- todo comment

/* TODO 
- Trigger: Create response ->
  - Update p(learned)
  - Calculate updated guess value

  return user;
end;
$$ language plpgsql strict security definer;
comment on function sg_public.sign_up(text, text, text)
  is 'Signs up a single user.';

create type sg_public.jwt_token as (
  role text,
