db builder
This commit is contained in:
parent
57c0a99285
commit
3c12d5273f
35
scripts/obrand.sql
Normal file
35
scripts/obrand.sql
Normal file
@ -0,0 +1,35 @@
|
||||
-- Database: "oBrand"
|
||||
|
||||
DROP DATABASE "oBrand";
|
||||
|
||||
-- Role: obrand
|
||||
|
||||
DROP ROLE obrand;
|
||||
|
||||
CREATE ROLE obrand LOGIN
|
||||
ENCRYPTED PASSWORD 'md51e16472d06fb312d14e3001f44e9460e'
|
||||
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
|
||||
|
||||
CREATE DATABASE "oBrand"
|
||||
WITH OWNER = postgres
|
||||
ENCODING = 'UTF8'
|
||||
TABLESPACE = pg_default
|
||||
LC_COLLATE = 'C'
|
||||
LC_CTYPE = 'C'
|
||||
CONNECTION LIMIT = -1;
|
||||
GRANT ALL ON DATABASE "oBrand" TO postgres;
|
||||
|
||||
|
||||
GRANT CONNECT ON DATABASE "oBrand" TO obrand;
|
||||
REVOKE ALL ON DATABASE "oBrand" FROM public;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES
|
||||
GRANT INSERT, SELECT, UPDATE ON TABLES
|
||||
TO public;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES
|
||||
GRANT INSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON TABLES
|
||||
TO postgres;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user