Skip to content

Commit

Permalink
pglite-sync: change from TRNCATE to DELETE FROM on must-refresh so th…
Browse files Browse the repository at this point in the history
…at triggers run
  • Loading branch information
samwillis committed Oct 16, 2024
1 parent 368eee1 commit 047d959
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pglite-sync/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async function createPlugin(
// TODO: sync into shadow table and reference count
// for now just clear the whole table - will break
// cases with multiple shapes on the same table
await tx.exec(`TRUNCATE ${options.table};`)
await tx.exec(`DELETE FROM ${options.table};`)
if (options.shapeKey) {
await deleteShapeSubscriptionState({
pg: tx,
Expand Down

0 comments on commit 047d959

Please sign in to comment.