From 2cc1f9550698fb4b4fce18c611d01dbc6d6970e1 Mon Sep 17 00:00:00 2001 From: Nicola Fulvio Calabria <nicola.calabria@inaf.it> Date: Tue, 26 Jan 2021 22:20:09 +0100 Subject: [PATCH] Prepared deleted_node table for deleteNode method implementation in NodeDAO --- 00-init.sql | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/00-init.sql b/00-init.sql index c494603..f429509 100644 --- a/00-init.sql +++ b/00-init.sql @@ -71,10 +71,41 @@ CREATE TABLE node ( CREATE TABLE deleted_node ( - node_id BIGSERIAL NOT NULL, - name VARCHAR NOT NULL, - owner_id VARCHAR NOT NULL, - last_modified TIMESTAMP default CURRENT_TIMESTAMP, + node_id BIGSERIAL NOT NULL, + parent_path LTREE default NULL, + parent_relative_path LTREE default NULL, + name VARCHAR NOT NULL, + os_name VARCHAR default NULL, + tstamp_wrapper_dir VARCHAR default NULL, + type NodeType NOT NULL, + location_type LocationType default NULL, + format VARCHAR default NULL, + -- format is used to distinguish between unstuctured (format=NULL) and structured nodes having a well defined format + async_trans BOOLEAN default NULL, + -- async_trans tells us whether a node is hosted on a cold storage and has to be transferred asynchronously + busy_state BOOLEAN default NULL, + owner_id VARCHAR default NULL, + creator_id VARCHAR default NULL, + group_read VARCHAR[] default NULL, + group_write VARCHAR[] default NULL, + is_public BOOLEAN default NULL, + delta BIGINT default NULL, + /* it may be a delta of data which is transferred through an asynchronous transfer. + It should stay on the transfer service (e.g. Redis) */ + content_type VARCHAR default NULL, + content_encoding VARCHAR default NULL, + content_length BIGINT default NULL, + content_md5 TEXT default NULL, + created_on TIMESTAMP default NULL, + last_modified TIMESTAMP default NULL, + -- link TEXT default NULL, + accept_views TEXT[] default NULL, + provide_views TEXT[] default NULL, + -- storage service mapping used to access the content of this node + -- storage_id VARCHAR, + protocols TEXT[] default NULL, + -- add a deleted_on timestamp to keep track + deleted_on TIMESTAMP default CURRENT_TIMESTAMP, PRIMARY KEY (node_id) ); -- GitLab