From 93fa6c48c4c0af621a2047c84e8faf014ab61243 Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Sat, 27 Jan 2024 09:10:36 +0100 Subject: [PATCH] removed FK contraint on error_code --- migration.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration.sql b/migration.sql index 7540c80..a7e3924 100644 --- a/migration.sql +++ b/migration.sql @@ -24,12 +24,13 @@ CREATE TABLE banking_stage_results_2.errors ( CREATE TABLE banking_stage_results_2.transaction_slot ( transaction_id BIGINT, slot BIGINT, - error_code INT REFERENCES banking_stage_results_2.errors(error_code), + error_code INT, count INT, utc_timestamp TIMESTAMP NOT NULL, PRIMARY KEY (transaction_id, slot, error_code) ); + CREATE INDEX idx_transaction_slot_timestamp ON banking_stage_results_2.transaction_slot(utc_timestamp); CREATE INDEX idx_transaction_slot_slot ON banking_stage_results_2.transaction_slot(slot);