Skip to content
Snippets Groups Projects
Commit eda5f227 authored by Matheus Horstmann's avatar Matheus Horstmann :horse:
Browse files

Issue #2: Integrate psql-manager and create dummies data

parent 9406764d
No related branches found
No related tags found
2 merge requests!4Resolve "Adicionar integração com PSQL manager",!2Resolve "Adicionar integração com PSQL manager"
Pipeline #19511 passed
*.in
*.out
*.swp
*.swo
*.tmp
docker-compose.yml
.env
image: debian:stretch
services:
- "postgres:10"
variables:
POSTGRES_DB: 'postgres'
POSTGRES_USER: 'postgres'
PGPASSWORD: 'postgres'
POSTGRES_HOST: 'postgres'
GIT_SUBMODULE_STRATEGY: normal
stages:
- test
run_test:
stage: test
script:
- apt-get update -q -y
- apt-get install wget gnupg -y
- echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
- apt-get update -q -y
- apt-get install -y postgresql-client-10
- ./psql-manager/manager.sh create ./workspace/
- ./psql-manager/manager.sh fixture ./workspace/
tags:
- debian
- postgres
[submodule "psql-manager"]
path = psql-manager
url = https://gitlab.c3sl.ufpr.br/c3sl/psql-manager.git
Subproject commit fe2cedf1403a91b9779cafa3fb5fc7288f5a017b
CREATE TABLE form (
id SERIAL PRIMARY KEY,
latest_version INTEGER
);
CREATE TABLE form_version (
id SERIAL PRIMARY KEY,
id_form INTEGER,
version INTEGER,
title TEXT,
description TEXT
);
);
CREATE TABLE input (
id SERIAL PRIMARY KEY,
id_form_version INTEGER,
id_form INTEGER,
placement INTEGER,
input_type TEXT,
question TEXT,
......@@ -23,26 +16,25 @@ CREATE TABLE input (
CREATE TABLE input_validation (
id SERIAL PRIMARY KEY,
id_input INTEGER,
validation_type TEXT,
argument_number INTEGER
validation_type TEXT
);
CREATE TABLE input_validation_argument (
id SERIAL PRIMARY KEY,
id_input_validation INTEGER,
placement INTEGER,
argument TEXT,
argument TEXT
);
CREATE TABLE form_version_answer (
CREATE TABLE form_answer (
id SERIAL PRIMARY KEY,
id_form_version INTEGER,
timestamp TIMESTAMP
id_form INTEGER,
answered_at TIMESTAMP
);
CREATE TABLE input_answer (
id SERIAL PRIMARY KEY,
id_form_version_answer INTEGER,
id_form_answer INTEGER,
id_input INTEGER,
value TEXT,
placement TEXT
......
1;'Form Title 1'; 'Form Description 1'
2;'Form Title 2'; 'Form Description 2'
3;'Form Title 3'; 'Form Description 3'
1; 3; '2018-06-02 10:10:25-03'
2; 2; '2019-01-12 11:10:25-03'
3; 1; '2019-02-21 12:10:25-03'
4; 2; '2017-06-15 13:10:25-03'
5; 3; '2018-12-31 23:59:59-03'
6; 1; '2019-01-22 19:10:25-03'
1; 1; 1; 'TEXT'; 'Question 1 Form 1';'Description Question 1 Form 1'
2; 1; 2; 'TEXT'; 'Question 2 Form 1';'Description Question 2 Form 1'
3; 1; 3; 'TEXT'; 'Question 3 Form 1';'Description Question 3 Form 1'
4; 2; 2; 'TEXT'; 'Question 2 Form 2';'Description Question 2 Form 2'
5; 2; 1; 'TEXT'; 'Question 1 Form 2';'Description Question 1 Form 2'
6; 3; 1; 'TEXT'; 'Question 1 Form 3';'Description Question 1 Form 3'
7; 3; 2; 'TEXT'; 'Question 2 Form 3';'Description Question 2 Form 3'
1; 1; 6; 'Answer to Question 1 Form 3'; 1
2; 1; 7; 'Answer to Question 2 Form 3'; 2
3; 2; 4; 'Answer to Question 2 Form 2'; 2
4; 2; 5; 'Answer to Question 1 Form 2'; 1
5; 3; 1; 'Answer to Question 1 Form 1'; 1
6; 3; 2; 'Answer to Question 2 Form 1'; 2
7; 3; 3; 'Answer to Question 3 Form 1'; 3
8; 4; 4; 'Answer to Question 2 Form 2'; 2
9; 4; 5; 'Answer to Question 1 Form 2'; 1
10; 5; 6; 'Answer to Question 1 Form 3'; 1
11; 5; 7; 'Answer to Question 2 Form 3'; 2
12; 6; 1; 'Answer to Question 1 Form 1'; 1
13; 6; 2; 'Answer to Question 2 Form 1'; 2
14; 6; 3; 'Answer to Question 3 Form 1'; 3
1;2; 'REGEX'
2;3; 'MAXCHAR'
3;4; 'MINCHAR'
4;5; 'MANDATORY'
5;6; 'MANDATORY'
6;7; 'MANDATORY'
7;2; 'MANDATORY'
8;3; 'MINCHAR'
1; 1; 1; '\\d{5}-\\d{3}'
2; 2; 1; '10'
3; 3; 1; '2'
4; 3; 2; '8'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment