mirror of
https://github.com/harness/drone.git
synced 2025-05-05 15:32:56 +00:00
fix: [AH-1197]: Fixing table creation (#3754)
* [AH-1197]: Fixing table creation
This commit is contained in:
parent
ebe634e5df
commit
4f7dc32dcc
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user