Loading 01-paths-indexes.sql +2 −0 Original line number Diff line number Diff line Loading @@ -36,5 +36,7 @@ CREATE UNIQUE INDEX file_path_idx ON node USING btree(path); ALTER TABLE node ADD COLUMN relative_path ltree GENERATED ALWAYS AS (path(parent_relative_path, node_id)) STORED; CREATE INDEX file_rel_path_gist_idx ON node USING GIST(relative_path); ALTER TABLE node ADD CONSTRAINT unique_path UNIQUE (parent_path, name); -- Create root node INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, is_public) VALUES (NULL, NULL, '', 'container', '0', true); Loading
01-paths-indexes.sql +2 −0 Original line number Diff line number Diff line Loading @@ -36,5 +36,7 @@ CREATE UNIQUE INDEX file_path_idx ON node USING btree(path); ALTER TABLE node ADD COLUMN relative_path ltree GENERATED ALWAYS AS (path(parent_relative_path, node_id)) STORED; CREATE INDEX file_rel_path_gist_idx ON node USING GIST(relative_path); ALTER TABLE node ADD CONSTRAINT unique_path UNIQUE (parent_path, name); -- Create root node INSERT INTO node (parent_path, parent_relative_path, name, type, creator_id, is_public) VALUES (NULL, NULL, '', 'container', '0', true);