feat(watchlist): add company identity catalog
Embed a pinned FinanceDatabase equity snapshot, add authenticated company search and identity-based follows, preserve legacy assets, and map selected Yahoo symbols for collection. Refs #19 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
BEGIN;
|
||||
ALTER TABLE user_assets ADD COLUMN company_id TEXT NULL,
|
||||
ADD COLUMN yahoo_symbol TEXT NULL,
|
||||
ADD COLUMN company_exchange TEXT NULL,
|
||||
ADD COLUMN company_country TEXT NULL,
|
||||
ADD COLUMN company_mic TEXT NULL;
|
||||
CREATE UNIQUE INDEX user_assets_company_unique ON user_assets(user_id,company_id) WHERE company_id IS NOT NULL;
|
||||
-- Legacy identities remain independent of catalogue follows, even for the same FIGI.
|
||||
DROP INDEX IF EXISTS user_assets_legacy_symbol_unique;
|
||||
DROP INDEX IF EXISTS user_assets_figi_unique;
|
||||
CREATE UNIQUE INDEX user_assets_legacy_symbol_unique ON user_assets(user_id,symbol) WHERE figi IS NULL AND company_id IS NULL;
|
||||
CREATE UNIQUE INDEX user_assets_figi_unique ON user_assets(user_id,figi) WHERE figi IS NOT NULL AND company_id IS NULL;
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user