diff --git a/catalyst-gateway/event-db/queries/insert_signed_documents.sql b/catalyst-gateway/event-db/queries/insert_signed_documents.sql index aae899aee59..df775a4f906 100644 --- a/catalyst-gateway/event-db/queries/insert_signed_documents.sql +++ b/catalyst-gateway/event-db/queries/insert_signed_documents.sql @@ -1,17 +1,17 @@ INSERT INTO signed_docs ( - id, - ver, - type, - author, + id, + ver, + type, + author, metadata, - payload, + payload, raw ) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (id, ver) DO UPDATE -SET +SET type = signed_docs.type WHERE signed_docs.type = EXCLUDED.type diff --git a/catalyst-gateway/event-db/queries/select_signed_documents.sql b/catalyst-gateway/event-db/queries/select_signed_documents.sql index 93053d22472..ff5b5089087 100644 --- a/catalyst-gateway/event-db/queries/select_signed_documents.sql +++ b/catalyst-gateway/event-db/queries/select_signed_documents.sql @@ -9,4 +9,4 @@ SELECT FROM signed_docs WHERE signed_docs.id = $1 - AND signed_docs.ver = $2 \ No newline at end of file + AND signed_docs.ver = $2