-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ set up ACLs and migration user (#92)
* feat: ✨ set up ACLs and migration user * fix: 🐛 add explicit grants to acl file [skip ci]
- Loading branch information
Showing
6 changed files
with
57 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
-- This file is used to control access to the database. | ||
-- You probably do not need to modify this. | ||
|
||
CREATE ROLE zotmeet_migrations LOGIN; | ||
CREATE ROLE zotmeet_prod LOGIN; | ||
CREATE ROLE zotmeet_staging LOGIN; | ||
|
||
GRANT ALL ON DATABASE zotmeet TO zotmeet_migrations; | ||
GRANT ALL ON DATABASE zotmeet TO zotmeet_prod; | ||
GRANT ALL ON DATABASE zotmeet TO zotmeet_staging; | ||
|
||
GRANT ALL ON SCHEMA drizzle TO zotmeet_migrations; | ||
GRANT ALL ON SCHEMA public TO zotmeet_migrations; | ||
GRANT ALL ON SCHEMA dev TO zotmeet_migrations; | ||
GRANT ALL ON SCHEMA public TO zotmeet_prod; | ||
GRANT ALL ON SCHEMA dev TO zotmeet_staging; | ||
|
||
GRANT ALL ON ALL TABLES IN SCHEMA public TO zotmeet_migrations; | ||
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO zotmeet_migrations; | ||
GRANT ALL ON ALL ROUTINES IN SCHEMA public TO zotmeet_migrations; | ||
GRANT ALL ON ALL TABLES IN SCHEMA dev TO zotmeet_migrations; | ||
GRANT ALL ON ALL SEQUENCES IN SCHEMA dev TO zotmeet_migrations; | ||
GRANT ALL ON ALL ROUTINES IN SCHEMA dev TO zotmeet_migrations; | ||
GRANT ALL ON ALL TABLES IN SCHEMA public TO zotmeet_prod; | ||
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO zotmeet_prod; | ||
GRANT ALL ON ALL ROUTINES IN SCHEMA public TO zotmeet_prod; | ||
GRANT ALL ON ALL TABLES IN SCHEMA dev TO zotmeet_staging; | ||
GRANT ALL ON ALL SEQUENCES IN SCHEMA dev TO zotmeet_staging; | ||
GRANT ALL ON ALL ROUTINES IN SCHEMA dev TO zotmeet_staging; | ||
|
||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO zotmeet_prod; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO zotmeet_prod; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON ROUTINES TO zotmeet_prod; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TYPES TO zotmeet_prod; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA dev GRANT ALL ON TABLES TO zotmeet_staging; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA dev GRANT ALL ON SEQUENCES TO zotmeet_staging; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA dev GRANT ALL ON ROUTINES TO zotmeet_staging; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA dev GRANT ALL ON TYPES TO zotmeet_staging; |