diff --git a/00-init.sql b/00-init.sql index 625f710a3605a8bf2c8996d4778fc20438e2dbd0..f6f5ed117a7cae5f336c656b70861f90e0470fe0 100644 --- a/00-init.sql +++ b/00-init.sql @@ -31,7 +31,7 @@ CREATE EXTENSION IF NOT EXISTS ltree; CREATE TYPE NodeType AS ENUM ('container', 'data', 'link', 'structured'); CREATE TYPE LocationType AS ENUM ('async', 'portal', 'user'); -CREATE TYPE StorageType AS ENUM ('cold', 'hot'); +CREATE TYPE StorageType AS ENUM ('cold', 'hot', 'local'); CREATE TABLE storage ( diff --git a/05-data.sql b/05-data.sql index da444fc55bb4a0d525ac8a410395d10d2ee61cd3..919edf97e903a0cf073534a95b6f241f24818d3f 100644 --- a/05-data.sql +++ b/05-data.sql @@ -1,16 +1,27 @@ /* - Initialization test for vospace node table; for now owner_id and group_id are set equal to the rap_id + Initialization test for storage table */ INSERT INTO storage (storage_type, base_path, hostname) VALUES ('cold', '/ia2_tape_stb_01/users', 'tape-fe.ia2.inaf.it'); INSERT INTO storage (storage_type, base_path, hostname) VALUES ('hot', '/home/users', 'server'); -INSERT INTO storage (storage_type, base_path, hostname) VALUES ('hot', '/home', 'localhost'); -INSERT INTO storage (storage_type, base_path, hostname) VALUES ('hot', '/home/vospace/upload', 'localhost'); +INSERT INTO storage (storage_type, base_path, hostname) VALUES ('local', '/home', 'localhost'); +INSERT INTO storage (storage_type, base_path, hostname) VALUES ('local', '/home/vospace/upload', 'localhost'); + + +/* + Initialization test for location table +*/ INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 1, 3); -INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 1, 3); +INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('async', 2, 3); INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('user', 4, 4); + +/* + Initialization test for vospace node table; for now owner_id and group_id are set equal to the rap_id +*/ + + -- parent_path = parent_relative_path INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id) VALUES (NULL, NULL, '', 'container', '0', '0'); -- / INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id) VALUES ('', '', 'curban', 'container', '3354', '3354'); -- /curban @@ -22,9 +33,6 @@ INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creat INSERT INTO node (parent_path, parent_relative_path, name, os_name, type, owner_id, creator_id, location_id) VALUES ('5.6', '6', 'f2_renamed', 'f2', 'container', '2386', '2386', 1); -- /test/f1/f2_renamed (rel: /f1/f2) INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, location_id) VALUES ('5.6.7', '6.7', 'f3', 'data', '2386', '2386', 1); -- /test/f1/f2_renamed/f3 (rel: /f1/f2/f3) -/* - Initialization test for location table -*/ /* Initialization test for vospace users table