From d378c2e3c5324a90a0a72479ce4be68e5ff65c68 Mon Sep 17 00:00:00 2001 From: Samuel Leite <shpl19@inf.ufpr.br> Date: Wed, 22 Sep 2021 10:12:20 -0300 Subject: [PATCH] changes to add new tables --- workspace/create/00-core-tables.sql | 16 ++++++++++++++++ workspace/fixture/input_operation.csv | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/workspace/create/00-core-tables.sql b/workspace/create/00-core-tables.sql index 5f4bba3..a8fdae6 100644 --- a/workspace/create/00-core-tables.sql +++ b/workspace/create/00-core-tables.sql @@ -90,3 +90,19 @@ CREATE TABLE form_owner ( id_form INTEGER ); +CREATE TABLE tables ( + id SERIAL PRIMARY KEY, + table_id INTEGER, + row INTEGER, + column_t INTEGER, + value TEXT, + enabled BOOLEAN DEFAULT true, + CONSTRAINT table_id_row_col UNIQUE (table_id, row, column_t) +); + +/* CREATE SEQUENCE input_table_table_id_seq; */ +CREATE TABLE input_table ( + table_id SERIAL PRIMARY KEY, + input_id INTEGER +); +/* ALTER SEQUENCE input_table_table_id_seq OWNED BY input_table.table_id; */ diff --git a/workspace/fixture/input_operation.csv b/workspace/fixture/input_operation.csv index 53d4beb..822a058 100644 --- a/workspace/fixture/input_operation.csv +++ b/workspace/fixture/input_operation.csv @@ -2,4 +2,5 @@ id;name 0;ADD 1;REMOVE 2;SWAP -3;REENABLED \ No newline at end of file +3;REENABLED +4;TABLE \ No newline at end of file -- GitLab