fix: [AH-1197]: Fixing table creation (#3754)

* [AH-1197]: Fixing table creation
This commit is contained in:
Arvind Choudhary 2025-04-30 21:23:06 +00:00 committed by Harness
parent ebe634e5df
commit 4f7dc32dcc
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ CREATE TABLE nodes (
node_generic_blob_id TEXT REFERENCES generic_blobs (generic_blob_id),
node_created_at INTEGER NOT NULL,
node_created_by INTEGER NOT NULL,
CONSTRAINT unique_nodes UNIQUE (node_name, node_parent_id)
CONSTRAINT unique_nodes UNIQUE (node_registry_id, node_path)
);
INSERT INTO nodes (

View File

@ -10,7 +10,7 @@ CREATE TABLE nodes (
node_generic_blob_id TEXT REFERENCES generic_blobs (generic_blob_id),
node_created_at INTEGER NOT NULL,
node_created_by INTEGER NOT NULL,
CONSTRAINT unique_nodes UNIQUE (node_name, node_parent_id)
CONSTRAINT unique_nodes UNIQUE (node_registry_id, node_path)
);
INSERT INTO nodes (

View File

@ -216,7 +216,7 @@ func (f *FileManager) SaveNode(
err := f.nodesDao.Create(ctx, node)
if err != nil {
return "", fmt.Errorf("failed to create the node: %s, "+
"for path := %s", segment, filePath)
"for path := %s, %w", segment, filePath, err)
}
return node.ID, nil
}