Browse Source

Update filer upsert sqlstring for postgresql (#6835)

pull/6838/head
Luna Yao 4 months ago
committed by GitHub
parent
commit
5e354a18a3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      weed/command/scaffold/filer.toml

16
weed/command/scaffold/filer.toml

@ -116,7 +116,13 @@ connection_max_open = 100
connection_max_lifetime_seconds = 0 connection_max_lifetime_seconds = 0
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax: # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
enableUpsert = true enableUpsert = true
upsertQuery = """UPSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4)"""
upsertQuery = """
INSERT INTO "%[1]s" (dirhash, name, directory, meta)
VALUES($1, $2, $3, $4)
ON CONFLICT (dirhash, name) DO UPDATE SET
directory=EXCLUDED.directory,
meta=EXCLUDED.meta
"""
[postgres2] [postgres2]
enabled = false enabled = false
@ -141,7 +147,13 @@ connection_max_open = 100
connection_max_lifetime_seconds = 0 connection_max_lifetime_seconds = 0
# if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax: # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
enableUpsert = true enableUpsert = true
upsertQuery = """UPSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4)"""
upsertQuery = """
INSERT INTO "%[1]s" (dirhash, name, directory, meta)
VALUES($1, $2, $3, $4)
ON CONFLICT (dirhash, name) DO UPDATE SET
directory=EXCLUDED.directory,
meta=EXCLUDED.meta
"""
[cassandra2] [cassandra2]
# CREATE TABLE filemeta ( # CREATE TABLE filemeta (

Loading…
Cancel
Save