Commit 0b09bd05 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added Users table into the vospace_testdb + initializations.

parent 0016ee11
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ CREATE TABLE Node (
    -- async_trans serve per indicare se il nodo e` ospitato da un cold storage e deve essere necessariamente 
    -- trasferito con un trasferimento asincrono 
    busy_state        BOOLEAN       default NULL,
    owner_id          VARCHAR       NOT NULL,
    creator_id        VARCHAR       NOT 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,
@@ -84,3 +84,11 @@ CREATE TABLE DeletedNode (
    last_modified     TIMESTAMP     default CURRENT_TIMESTAMP,
    PRIMARY KEY (node_id)
);


CREATE TABLE Users (
    rap_id            VARCHAR       NOT NULL,
    user_name         VARCHAR       NOT NULL,
    e_mail            VARCHAR       NOT NULL,
    PRIMARY KEY (rap_id)
);
 No newline at end of file
+13 −4
Original line number Diff line number Diff line
@@ -5,7 +5,16 @@
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES (NULL, '', 'container', '3354', '3354');          -- /
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('', 'curban', 'container', '3354', '3354');      -- /curban
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('2', 'store', 'container', '3354', '3354');      -- /curban/store
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('', 'sbertocco', 'container', '3354', '3354');   -- /sbertocco
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('4', 'store', 'container', '3354', '3354');      -- /sbertocco/store
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('', 'szorba', 'container', '3354', '3354');      -- /szorba
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('6', 'store', 'container', '3354', '3354');      -- /szorba/store
 No newline at end of file
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('', 'sbertocco', 'container', '2048', '2048');   -- /sbertocco
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('4', 'store', 'container', '2048', '2048');      -- /sbertocco/store
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('', 'szorba', 'container', '2386', '2386');      -- /szorba
INSERT INTO Node (parent_path, name, type, owner_id, creator_id) VALUES ('6', 'store', 'container', '2386', '2386');      -- /szorba/store


/*
   Initialization test for vospace Users table
*/

INSERT INTO Users (rap_id, user_name, e_mail) VALUES ('3354', 'curban', 'cristiano.urban@inaf.it');
INSERT INTO Users (rap_id, user_name, e_mail) VALUES ('2048', 'sbertocco', 'sara.bertocco@inaf.it');
INSERT INTO Users (rap_id, user_name, e_mail) VALUES ('2386', 'szorba', 'sonia.zorba@inaf.it');
 No newline at end of file