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

Correct timestamps for school years [ci skip] #23643

Merged
merged 1 commit into from
Jul 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions aws/redshift/tables/school_years.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ drop table if exists analysis.school_years;
create table analysis.school_years (
school_year varchar,
school_year_int int,
started_at date,
ended_at date
started_at timestamp,
ended_at timestamp
);

insert into analysis.school_years values
('2013-14', 2013, '2013-07-01', '2014-07-01'),
('2014-15', 2014, '2014-07-01', '2015-07-01'),
('2015-16', 2015, '2015-07-01', '2016-07-01'),
('2016-17', 2016, '2016-07-01', '2017-07-01'),
('2017-18', 2017, '2017-07-01', '2018-07-01'),
('2018-19', 2018, '2018-07-01', '2019-07-01'),
('2019-20', 2019, '2019-07-01', '2020-07-01');
('2013-14', 2013, '2013-07-01 00:00:00', '2014-06-30 23:59:59'),
('2014-15', 2014, '2014-07-01 00:00:00', '2015-06-30 23:59:59'),
('2015-16', 2015, '2015-07-01 00:00:00', '2016-06-30 23:59:59'),
('2016-17', 2016, '2016-07-01 00:00:00', '2017-06-30 23:59:59'),
('2017-18', 2017, '2017-07-01 00:00:00', '2018-06-30 23:59:59'),
('2018-19', 2018, '2018-07-01 00:00:00', '2019-06-30 23:59:59'),
('2019-20', 2019, '2019-07-01 00:00:00', '2020-06-30 23:59:59');

GRANT ALL PRIVILEGES ON analysis.school_years TO GROUP admin;
GRANT SELECT ON analysis.school_years TO GROUP reader, GROUP reader_pii;