diff --git a/workspace/create/00-core-tables.sql b/workspace/create/00-core-tables.sql index 7e3fd5598aed228b512db26d9c27cf701bf7299d..bc7e5ba25b9bdb3a0aa61c7dedbe2e1b4d0349e9 100644 --- a/workspace/create/00-core-tables.sql +++ b/workspace/create/00-core-tables.sql @@ -41,16 +41,21 @@ CREATE TABLE input_answer ( placement INTEGER ); -CREATE TABLE form_updates ( +CREATE TABLE form_update ( id SERIAL PRIMARY KEY, id_form INTEGER, - update_data TEXT + update_date TIMESTAMP ); -CREATE TABLE input_updates ( +CREATE TABLE input_update ( id SERIAL PRIMARY KEY, - id_form_updates INTEGER, + id_form_update INTEGER, id_input INTEGER, - input_operation char(3), + input_operation_id INTEGER, value TEXT ); + +CREATE TABLE input_operation ( + id INTEGER, + name TEXT +); diff --git a/workspace/fixture/form_update.csv b/workspace/fixture/form_update.csv new file mode 100644 index 0000000000000000000000000000000000000000..730fde1e3c1faac3eea7237e0a84605caa949364 --- /dev/null +++ b/workspace/fixture/form_update.csv @@ -0,0 +1 @@ +id;id_form;update_date diff --git a/workspace/fixture/form_updates.csv b/workspace/fixture/form_updates.csv deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/workspace/fixture/input_operation.csv b/workspace/fixture/input_operation.csv new file mode 100644 index 0000000000000000000000000000000000000000..4466b216d7cd161b08fcc31706a0ec8ae63c1f8c --- /dev/null +++ b/workspace/fixture/input_operation.csv @@ -0,0 +1,4 @@ +id;name +0;ADD +1;REMOVE +2;SWAP diff --git a/workspace/fixture/input_update.csv b/workspace/fixture/input_update.csv new file mode 100644 index 0000000000000000000000000000000000000000..189949b1035faac6f033df33a664d46c7bee2eb6 --- /dev/null +++ b/workspace/fixture/input_update.csv @@ -0,0 +1 @@ +id;id_form_update;id_input;input_operation_id;value diff --git a/workspace/fixture/input_updates.csv b/workspace/fixture/input_updates.csv deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000