From b8feff79890c2e7b81039c367fbad55ad3e74062 Mon Sep 17 00:00:00 2001
From: Matheus Horstmann <mch15@inf.ufpr.br>
Date: Mon, 8 Apr 2019 11:42:42 -0300
Subject: [PATCH] Issue#4: Fix fixture and update submodule

Signed-off-by: Matheus Horstmann <mch15@inf.ufpr.br>
---
 psql-manager                                  |  2 +-
 workspace/create/00-core-tables.sql           |  2 +-
 workspace/fixture/form.csv                    |  7 +++--
 workspace/fixture/form_answer.csv             | 13 +++++----
 workspace/fixture/input.csv                   | 15 +++++-----
 workspace/fixture/input_answer.csv            | 29 ++++++++++---------
 workspace/fixture/input_validation.csv        | 17 ++++++-----
 .../fixture/input_validation_argument.csv     |  9 +++---
 8 files changed, 50 insertions(+), 44 deletions(-)

diff --git a/psql-manager b/psql-manager
index fe2cedf..10bce2d 160000
--- a/psql-manager
+++ b/psql-manager
@@ -1 +1 @@
-Subproject commit fe2cedf1403a91b9779cafa3fb5fc7288f5a017b
+Subproject commit 10bce2d2249d2a51a44764b825a88272238648b4
diff --git a/workspace/create/00-core-tables.sql b/workspace/create/00-core-tables.sql
index 451b87b..fa678fc 100644
--- a/workspace/create/00-core-tables.sql
+++ b/workspace/create/00-core-tables.sql
@@ -37,5 +37,5 @@ CREATE TABLE input_answer (
     id_form_answer INTEGER,
     id_input INTEGER,
     value TEXT,
-    placement TEXT
+    placement INTEGER
 );
diff --git a/workspace/fixture/form.csv b/workspace/fixture/form.csv
index 9b0bd12..823b8a0 100644
--- a/workspace/fixture/form.csv
+++ b/workspace/fixture/form.csv
@@ -1,3 +1,4 @@
-1;'Form Title 1'; 'Form Description 1'
-2;'Form Title 2'; 'Form Description 2'
-3;'Form Title 3'; 'Form Description 3'
+id;title;description
+1;Form Title 1;Form Description 1
+2;Form Title 2;Form Description 2
+3;Form Title 3;Form Description 3
diff --git a/workspace/fixture/form_answer.csv b/workspace/fixture/form_answer.csv
index bd53037..9258db4 100644
--- a/workspace/fixture/form_answer.csv
+++ b/workspace/fixture/form_answer.csv
@@ -1,6 +1,7 @@
-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'
+id;id_form;answered_at
+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
diff --git a/workspace/fixture/input.csv b/workspace/fixture/input.csv
index 3615a98..6c98f74 100644
--- a/workspace/fixture/input.csv
+++ b/workspace/fixture/input.csv
@@ -1,7 +1,8 @@
-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'
+id;id_form;placement;input_type;question;description
+1; 1; 0;TEXT;Question 1 Form 1;Description Question 1 Form 1
+2; 1; 2;TEXT;Question 3 Form 1;Description Question 3 Form 1
+3; 1; 1;TEXT;Question 2 Form 1;Description Question 2 Form 1
+4; 2; 1;TEXT;Question 2 Form 2;Description Question 2 Form 2
+5; 2; 0;TEXT;Question 1 Form 2;Description Question 1 Form 2
+6; 3; 0;TEXT;Question 1 Form 3;Description Question 1 Form 3
+7; 3; 1;TEXT;Question 2 Form 3;Description Question 2 Form 3
diff --git a/workspace/fixture/input_answer.csv b/workspace/fixture/input_answer.csv
index 4ebb0c3..ac61544 100644
--- a/workspace/fixture/input_answer.csv
+++ b/workspace/fixture/input_answer.csv
@@ -1,14 +1,15 @@
-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
+id;id_form_answer;id_input;value;placement
+1; 1; 6;Answer to Question 1 Form 3; 0
+2; 1; 7;Answer to Question 2 Form 3; 1
+3; 2; 4;Answer to Question 2 Form 2; 1
+4; 2; 5;Answer to Question 1 Form 2; 0
+5; 3; 1;Answer to Question 1 Form 1; 0
+6; 3; 2;Answer to Question 2 Form 1; 1
+7; 3; 3;Answer to Question 3 Form 1; 2
+8; 4; 4;Answer to Question 2 Form 2; 1
+9; 4; 5;Answer to Question 1 Form 2; 0
+10; 5; 6;Answer to Question 1 Form 3; 0
+11; 5; 7;Answer to Question 2 Form 3; 1
+12; 6; 1;Answer to Question 1 Form 1; 0
+13; 6; 2;Answer to Question 2 Form 1; 1
+14; 6; 3;Answer to Question 3 Form 1; 2
diff --git a/workspace/fixture/input_validation.csv b/workspace/fixture/input_validation.csv
index 2650619..42a561c 100644
--- a/workspace/fixture/input_validation.csv
+++ b/workspace/fixture/input_validation.csv
@@ -1,8 +1,9 @@
-1;2; 'REGEX'
-2;3; 'MAXCHAR'
-3;4; 'MINCHAR'
-4;5; 'MANDATORY'
-5;6; 'MANDATORY'
-6;7; 'MANDATORY'
-7;2; 'MANDATORY'
-8;3; 'MINCHAR'
+id;id_input;validation_type
+1;2;REGEX
+2;3;MAXCHAR
+3;4;MINCHAR
+4;5;MANDATORY
+5;6;MANDATORY
+6;7;MANDATORY
+7;2;MANDATORY
+8;3;MINCHAR
diff --git a/workspace/fixture/input_validation_argument.csv b/workspace/fixture/input_validation_argument.csv
index 121fb14..1546aa4 100644
--- a/workspace/fixture/input_validation_argument.csv
+++ b/workspace/fixture/input_validation_argument.csv
@@ -1,4 +1,5 @@
-1; 1; 1; '\\d{5}-\\d{3}'
-2; 2; 1; '10'
-3; 3; 1; '2'
-4; 3; 2; '8'
+id;id_input_validation;placement;argument
+1; 1; 0;\d{5}-\d{3}
+2; 2; 0;10
+3; 8; 0;2
+4; 3; 0;8
-- 
GitLab