rebuild(stage-8): deliver market insight workspaces

This commit is contained in:
leefer
2026-07-30 04:12:04 +08:00
parent a18e8e9d27
commit 976a5cac03
39 changed files with 3671 additions and 14 deletions
@@ -0,0 +1,33 @@
from __future__ import annotations
import sqlite3
from backend.database.migrations.runner import Migration
def upgrade(connection: sqlite3.Connection) -> None:
connection.execute(
"""
CREATE TABLE watchlist_entries (
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
identifier TEXT NOT NULL,
name TEXT NOT NULL,
sector TEXT,
created_at TEXT NOT NULL,
PRIMARY KEY (user_id, identifier)
)
"""
)
def downgrade(connection: sqlite3.Connection) -> None:
connection.execute("DROP TABLE watchlist_entries")
MIGRATION = Migration(
version=6,
name="create_account_watchlists",
signature="accounts:v2:isolated-watchlist-entries",
upgrade=upgrade,
downgrade=downgrade,
)