Skip to content
Snippets Groups Projects
Commit 862a66e7 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Removed 'location_type', added 'location_id' which points to 'location' +...

Removed 'location_type', added 'location_id' which points to 'location' + modified 'LocationType' enum.

Signed-off-by: default avatarCristiano Urban <cristiano.urban@inaf.it>
parent 2cc1f955
Branches
Tags
No related merge requests found
Pipeline #917 passed
......@@ -30,7 +30,7 @@
CREATE EXTENSION IF NOT EXISTS ltree;
CREATE TYPE NodeType AS ENUM ('container', 'data', 'link', 'structured');
CREATE TYPE LocationType AS ENUM ('virtual', 'tape', 'user', 'LBT');
CREATE TYPE LocationType AS ENUM ('async', 'user', 'portal');
CREATE TABLE node (
node_id BIGSERIAL NOT NULL,
......@@ -40,7 +40,7 @@ CREATE TABLE node (
os_name VARCHAR default NULL,
tstamp_wrapper_dir VARCHAR default NULL,
type NodeType NOT NULL,
location_type LocationType default 'virtual',
location_id SMALLINT NOT 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 false,
......@@ -78,7 +78,7 @@ CREATE TABLE deleted_node (
os_name VARCHAR default NULL,
tstamp_wrapper_dir VARCHAR default NULL,
type NodeType NOT NULL,
location_type LocationType default NULL,
location_id SMALLINT NOT 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,
......@@ -110,6 +110,15 @@ CREATE TABLE deleted_node (
);
CREATE TABLE location (
location_id SMALLSERIAL NOT NULL,
location_type LocationType NOT NULL,
base_path VARCHAR NOT NULL,
hostname VARCHAR NOT NULL,
PRIMARY KEY (location_id)
);
CREATE TABLE users (
rap_id VARCHAR NOT NULL,
user_name VARCHAR NOT NULL,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment