From 56e3d51fa4e2672d89251903fcac77a56b00e4ca Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 30 Jun 2020 13:35:11 +0100 Subject: [PATCH] Fix table name --- federationsender/storage/postgres/queue_json_table.go | 8 ++++---- federationsender/storage/sqlite3/queue_json_table.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/federationsender/storage/postgres/queue_json_table.go b/federationsender/storage/postgres/queue_json_table.go index 2852713ce..1a011632e 100644 --- a/federationsender/storage/postgres/queue_json_table.go +++ b/federationsender/storage/postgres/queue_json_table.go @@ -27,7 +27,7 @@ import ( const queueJSONSchema = ` -- The queue_retry_json table contains event contents that -- we failed to send. -CREATE TABLE IF NOT EXISTS federationsender_queue_retry_json ( +CREATE TABLE IF NOT EXISTS federationsender_queue_json ( -- The JSON NID. This allows the federationsender_queue_retry table to -- cross-reference to find the JSON blob. json_nid BIGSERIAL, @@ -37,15 +37,15 @@ CREATE TABLE IF NOT EXISTS federationsender_queue_retry_json ( ` const insertJSONSQL = "" + - "INSERT INTO federationsender_queue_retry_json (json_body)" + + "INSERT INTO federationsender_queue_json (json_body)" + " VALUES ($1)" + " ON CONFLICT DO NOTHING" const deleteJSONSQL = "" + - "DELETE FROM federationsender_queue_retry_json WHERE json_nid = ANY($1)" + "DELETE FROM federationsender_queue_json WHERE json_nid = ANY($1)" const selectJSONSQL = "" + - "SELECT json_nid, json_body FROM federationsender_queue_retry_json" + + "SELECT json_nid, json_body FROM federationsender_queue_json" + " WHERE json_nid = ANY($1)" type queueJSONStatements struct { diff --git a/federationsender/storage/sqlite3/queue_json_table.go b/federationsender/storage/sqlite3/queue_json_table.go index 1d5d811a7..3c88bedac 100644 --- a/federationsender/storage/sqlite3/queue_json_table.go +++ b/federationsender/storage/sqlite3/queue_json_table.go @@ -27,7 +27,7 @@ import ( const queueJSONSchema = ` -- The queue_retry_json table contains event contents that -- we failed to send. -CREATE TABLE IF NOT EXISTS federationsender_queue_retry_json ( +CREATE TABLE IF NOT EXISTS federationsender_queue_json ( -- The JSON NID. This allows the federationsender_queue_retry table to -- cross-reference to find the JSON blob. json_nid BIGSERIAL, @@ -37,15 +37,15 @@ CREATE TABLE IF NOT EXISTS federationsender_queue_retry_json ( ` const insertJSONSQL = "" + - "INSERT INTO federationsender_queue_retry_json (json_body)" + + "INSERT INTO federationsender_queue_json (json_body)" + " VALUES ($1)" + " ON CONFLICT DO NOTHING" const deleteJSONSQL = "" + - "DELETE FROM federationsender_queue_retry_json WHERE json_nid = ANY($1)" + "DELETE FROM federationsender_queue_json WHERE json_nid = ANY($1)" const selectJSONSQL = "" + - "SELECT json_nid, json_body FROM federationsender_queue_retry_json" + + "SELECT json_nid, json_body FROM federationsender_queue_json" + " WHERE json_nid = ANY($1)" type queueJSONStatements struct {