Fix: Setup-Wizard Redirect + market_news Migration

- Replace navigate() with window.location.href for full page reload
  after setup completion (fixes redirect loop back to /setup)
- Add migration 002: market_news table with indexes
- Remove unused useNavigate import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sam 2026-03-02 16:32:43 +01:00
parent c15176bff4
commit 94cf618e0d
2 changed files with 24 additions and 3 deletions

View file

@ -0,0 +1,22 @@
-- Migration 002: Market News table
-- Written by n8n workflows, read by the dashboard.
CREATE TABLE IF NOT EXISTS market_news (
id SERIAL PRIMARY KEY,
source VARCHAR(200) NOT NULL DEFAULT '',
title TEXT NOT NULL,
url TEXT NOT NULL DEFAULT '',
category VARCHAR(100),
published_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_market_news_published
ON market_news (published_at DESC);
CREATE INDEX IF NOT EXISTS idx_market_news_category
ON market_news (category);
-- Record this migration
INSERT INTO schema_version (version, description)
VALUES (2, 'market_news table for n8n-sourced articles')
ON CONFLICT (version) DO NOTHING;