Skip to content
05-data.sql 3.46 KiB
Newer Older
   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', '/mnt/hot_storage/users', 'server');
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');
INSERT INTO storage (storage_type, base_path, hostname) VALUES ('portal', '/files/new/lbt', 'archive.lbto.org');


/*
   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', 2, 3);
INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('user', 4, 4);
INSERT INTO location (location_type, storage_src_id, storage_dest_id) VALUES ('portal', 5, 5);

/*
   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, is_public, sticky) VALUES (NULL, NULL, '', 'container', '0', '0', true, true);                                                                                -- /
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, sticky) VALUES ('', NULL, 'curban', 'container', '3354', '3354', true);                                                                        -- /curban
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, sticky) VALUES ('', NULL, 'sbertocco', 'container', '2048', '2048', true);                                                                     -- /sbertocco
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, sticky) VALUES ('', NULL, 'szorba', 'container', '2386', '2386', true);                                                                        -- /szorba
-- parent_path <> parent_relative_path
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id, group_read, group_write) VALUES ('', NULL, 'test', 'container', '2386', '2386', '{"VOSpace.test1"}','{"VOSpace.test1"}');      -- /test
INSERT INTO node (parent_path, parent_relative_path, name, type, owner_id, creator_id) VALUES ('5', '', 'f1', 'container', '2386', '2386');                                                                           -- /test/f1 (rel: /f1)
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 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');