Skip to content

Commit

Permalink
docs: criação do banco de dados postgres #64
Browse files Browse the repository at this point in the history
  • Loading branch information
tacianosilva committed Oct 4, 2022
1 parent 6a8239e commit 1827d7c
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,32 @@ Para executar o projeto, será necessário instalar os seguintes programas:
Código abaixo:

1. Criação das bases de dados e usuário
```sql
CREATE DATABASE apf_db;
CREATE DATABASE apf_db_test;

CREATE USER 'apf_user'@'localhost' IDENTIFIED BY '12345';
```sql
CREATE ROLE apf_user WITH
LOGIN
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
NOINHERIT
NOREPLICATION
CONNECTION LIMIT -1
PASSWORD 'xxxxxx';
COMMENT ON ROLE apf_user IS 'Usuário do Sistema APF de Contagem de Pontos de Função.';
```

GRANT ALL ON apf_db.* TO 'apf_user'@'localhost';
GRANT ALL ON apf_db_test.* TO 'apf_user'@'localhost';
```sql
CREATE DATABASE apf_db
WITH
OWNER = apf_user
ENCODING = 'UTF8'
CONNECTION LIMIT = -1;

CREATE SCHEMA IF NOT EXISTS apf
AUTHORIZATION apf_user;
```


2. Povoamento do Banco de Dados
```sql
INSERT INTO role VALUES (1,'ADMIN');
Expand Down

0 comments on commit 1827d7c

Please sign in to comment.