diff --git a/psql-manager b/psql-manager index fe2cedf1403a91b9779cafa3fb5fc7288f5a017b..10bce2d2249d2a51a44764b825a88272238648b4 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 451b87b565d3c7d3b4ece924c31ed784c354e827..fa678fce8fcacd4a27dee0887272eeea4aaba7cc 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 9b0bd12b1a4cf7f7d2ab8efc90d949abf68b624e..823b8a0ca8029622f92168fb54e3e9fcb83251d5 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 bd53037a03e0d20328145689feb200e42464bfa8..9258db47fe8ffd316bc7631a8508240c284347e7 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 3615a98ddd8b3c9c56eded65ff0f5b57cadd9549..6c98f7405e389c3b67fa261cb8513b6a2279a8fc 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 4ebb0c3b1bcb4ff99eff25823d036579e94bc058..ac61544adb9c0d8691ec658aa86a12d8e0285112 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 2650619200427e8adf9310faaabc5b9f9d6b44a3..42a561ca797a20cb7aec163869e2cb0e6e5889dc 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 121fb14e308afa88f3cb068007e0ed82329e0870..1546aa463389e35932a589219f88feab6b8b4edf 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