1
0
Fork 0
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
mareshq-cluster-kiwi/docs/create-postgres-user.md
Vojtech Mares a4f9b46fdb
feat: initial commit
Signed-off-by: Vojtech Mares <iam@vojtechmares.com>
2023-12-13 18:15:03 +01:00

440 B

Create Postgres user

CREATE DATABASE <dbname>;
\c <dbname>;

CREATE USER <username> WITH ENCRYPTED PASSWORD '<password>';

GRANT CONNECT ON DATABASE <dbname> TO <username>;
GRANT ALL ON SCHEMA public TO <username>;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO <username>;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO <username>;
ALTER USER <username> CREATEDB; # Prisma ORM needs this to run migrations