Commit f26d9fc7 authored by Fernando Takagi's avatar Fernando Takagi
Browse files

Ignore insert if it exists.

parent 784bf06c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -699,6 +699,7 @@ func storagePrepBatch(batch *pgx.Batch, authoritativeWrite bool, op *StorageOpWr
		query = `
		INSERT INTO storage (collection, key, user_id, value, version, read, write, create_time, update_time)
		VALUES ($1, $2, $3, $4, $5, $6, $7, now(), now())
		ON CONFLICT (collection, key, user_id) DO NOTHING 
		RETURNING read, write, version, create_time, update_time`

		// Outcomes: