drop owned by "speaker-to-postgres" cascade;
drop database if exists mitsfs;
drop role if exists "speaker-to-postgres";
create role "speaker-to-postgres" superuser createrole createdb noinherit;
grant "speaker-to-postgres" to :USER;
set role "speaker-to-postgres";
create database mitsfs owner="speaker-to-postgres" encoding='UTF8';
drop role if exists libcomm;
drop role if exists mancinicomm;
drop role if exists panthercomm;
drop role if exists hasslecomm;
drop role if exists "*chamber";
drop role if exists keyholders;
drop role if exists prentices;
drop role if exists surgeon;
drop role if exists system;
create role libcomm;
grant libcomm to :USER;
create role "*chamber" createrole noinherit;
grant libcomm to "*chamber" with admin option;
create role panthercomm;
create role hasslecomm;
create role keyholders role panthercomm, hasslecomm admin "*chamber";
create role prentices admin keyholders;
grant panthercomm to libcomm;
create role mancinicomm;
grant mancinicomm to panthercomm;
create role surgeon;
create role system noinherit;
grant system to postgres;
grant system to wheel;
grant system to "speaker-to-postgres";

