CREATE DATABASE sec_cybert;

CREATE USER sec_cybert WITH LOGIN PASSWORD 'sec_cybert';

GRANT ALL PRIVILEGES ON DATABASE sec_cybert TO sec_cybert;

\c sec_cybert;

GRANT ALL PRIVILEGES ON DATABASE sec_cybert TO sec_cybert;
GRANT ALL PRIVILEGES ON SCHEMA public TO sec_cybert;

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO sec_cybert;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO sec_cybert;
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO sec_cybert;

ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO sec_cybert;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO sec_cybert;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON FUNCTIONS TO sec_cybert;

ALTER SCHEMA public OWNER TO sec_cybert;
