Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add teacher details directly to the users table #5303

Merged
merged 2 commits into from
Apr 18, 2023
Merged

Conversation

jon-betts
Copy link
Contributor

For:

We now know we don't have to keep teacher emails in Canada. This should help us quite a bit making this fast and making full use of Metabase.

This keeps a backward compatible view for users_sensitive while it gets stripped out.


REFRESH MATERIALIZED VIEW report.users;

ANALYSE report.users;

-- A unique index is mandatory for concurrent updates used in the refresh
CREATE UNIQUE INDEX users_id_idx ON report.users (id);
CREATE INDEX users_registered_date_idx ON report.users USING BRIN (registered_date);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we used this

Copy link
Member

@marcospri marcospri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read thru this and tried to refresh my memory in all the tables involved, all makes sense.

FROM h.user AS users
WHERE
users.authority = '{{ region.authority }}'
-- users.authority = 'lms.hypothes.is'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left from testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left these in permanently as they are kind of handy when copy pasting things into Metabase to test

@jon-betts jon-betts merged commit 0902bf1 into main Apr 18, 2023
@jon-betts jon-betts deleted the teacher-details branch April 18, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants