Skip to content

Commit

Permalink
fix: Update ShareDB postgres code to handle required flow.name
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jun 18, 2024
1 parent 5941e4b commit 81ee4ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sharedb.planx.uk/sharedb-postgresql.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ PostgresDB.prototype.commit = function (

client.query("BEGIN", (err) => {
client.query(
"INSERT INTO flows (id, slug) VALUES ($1, $2) ON CONFLICT DO NOTHING",
[id, id],
"INSERT INTO flows (id, slug, name) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING",
[id, id, id],
(err, _res) => {
if (err) {
rollback(client, done);
Expand Down Expand Up @@ -156,7 +156,7 @@ PostgresDB.prototype.commit = function (
};

// Get the named document from the database. The callback is called with (err,
// snapshot). A snapshot with a version of zero is returned if the docuemnt
// snapshot). A snapshot with a version of zero is returned if the document
// has never been created in the database.
PostgresDB.prototype.getSnapshot = function (
_collection,
Expand Down

0 comments on commit 81ee4ff

Please sign in to comment.