Persist Frankfurter EUR/DKK rates in currencies table
Store daily exchange rates in PostgreSQL with EUR/DKK cross rate. Seed rates atom from DB on startup so WebSocket works immediately even if Frankfurter is unreachable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE currencies (
|
||||
rate_date DATE PRIMARY KEY,
|
||||
eur NUMERIC(12,6) NOT NULL,
|
||||
dkk NUMERIC(12,6) NOT NULL,
|
||||
eur_dkk NUMERIC(12,6) NOT NULL,
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
Reference in New Issue
Block a user