From 9385e2224da32378eff633ed2b0f4d209a0e834d Mon Sep 17 00:00:00 2001 From: LazyDBA247-Anyvision Date: Tue, 30 Mar 2021 10:51:52 +0300 Subject: [PATCH] fix postgres2 upsertQuery syntax also --- weed/command/scaffold.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go index 668bb1b0d..4794da18e 100644 --- a/weed/command/scaffold.go +++ b/weed/command/scaffold.go @@ -194,7 +194,7 @@ connection_max_open = 100 connection_max_lifetime_seconds = 0 # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax: enableUpsert = true -upsertQuery = """INSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4) ON CONFLICT ON CONSTRAINT "%[1]s_pkey" DO UPDATE SET meta = EXCLUDED.meta WHERE "%[1]s".meta != EXCLUDED.meta""" +upsertQuery = """INSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4) ON CONFLICT (dirhash,name) DO UPDATE SET meta = EXCLUDED.meta WHERE "%[1]s".meta != EXCLUDED.meta""" [cassandra] # CREATE TABLE filemeta (