Skip to content

Commit

Permalink
update db shcema
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemanthghs committed Dec 2, 2024
1 parent dd68df4 commit e86eff6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions server/schema/update_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 $$;

0 comments on commit e86eff6

Please sign in to comment.