From e86eff673f3b7f386dd986330df9991f21302323 Mon Sep 17 00:00:00 2001 From: hemanthghs Date: Mon, 2 Dec 2024 17:24:34 +0530 Subject: [PATCH] update db shcema --- server/schema/update_schema.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/schema/update_schema.sql b/server/schema/update_schema.sql index 46b74c741..f64656bf1 100644 --- a/server/schema/update_schema.sql +++ b/server/schema/update_schema.sql @@ -25,3 +25,16 @@ BEGIN ADD COLUMN signed_at TIMESTAMP DEFAULT NULL; END IF; END $$; + +DO $$ +BEGIN + -- Check and add the txn_sequence column if it doesn't exist + IF NOT EXISTS ( + SELECT 1 + FROM information_schema.columns + WHERE table_name = 'transactions' AND column_name = 'txn_sequence' + ) THEN + ALTER TABLE transactions + ADD COLUMN txn_sequence INTEGER DEFAULT NULL; + END IF; +END $$; \ No newline at end of file