Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
When updating the snapshot table, the metadata field was mistakenly updated to the data field
  • Loading branch information
cuihom authored Oct 18, 2024
1 parent 58ee945 commit e7c2d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ PostgresDB.prototype.commit = async function(collection, id, op, snapshot, optio
WHERE collection = $1 AND doc_id = $2
FOR UPDATE
)
ON CONFLICT (collection, doc_id) DO UPDATE SET version = $3, data = $5, doc_type = $4, metadata = $5
ON CONFLICT (collection, doc_id) DO UPDATE SET version = $3, data = $5, doc_type = $4, metadata = $6
RETURNING version
)
INSERT INTO ops (collection, doc_id, version, operation)
Expand Down

0 comments on commit e7c2d87

Please sign in to comment.