Implement fiscal-style research MVP flows
Some checks failed
PR Checks / typecheck-and-build (push) Has been cancelled
Some checks failed
PR Checks / typecheck-and-build (push) Has been cancelled
This commit is contained in:
41
drizzle/0006_coverage_journal_tracking.sql
Normal file
41
drizzle/0006_coverage_journal_tracking.sql
Normal file
@@ -0,0 +1,41 @@
|
||||
ALTER TABLE `watchlist_item` ADD `status` text NOT NULL DEFAULT 'backlog';
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `watchlist_item` ADD `priority` text NOT NULL DEFAULT 'medium';
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `watchlist_item` ADD `updated_at` text NOT NULL DEFAULT '';
|
||||
--> statement-breakpoint
|
||||
UPDATE `watchlist_item`
|
||||
SET `status` = 'backlog'
|
||||
WHERE `status` IS NULL OR TRIM(`status`) = '';
|
||||
--> statement-breakpoint
|
||||
UPDATE `watchlist_item`
|
||||
SET `priority` = 'medium'
|
||||
WHERE `priority` IS NULL OR TRIM(`priority`) = '';
|
||||
--> statement-breakpoint
|
||||
UPDATE `watchlist_item`
|
||||
SET `updated_at` = COALESCE(NULLIF(`created_at`, ''), CURRENT_TIMESTAMP)
|
||||
WHERE `updated_at` IS NULL OR TRIM(`updated_at`) = '';
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `watchlist_item` ADD `last_reviewed_at` text;
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `holding` ADD `company_name` text;
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `watchlist_user_updated_idx` ON `watchlist_item` (`user_id`, `updated_at`);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `research_journal_entry` (
|
||||
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`user_id` text NOT NULL,
|
||||
`ticker` text NOT NULL,
|
||||
`accession_number` text,
|
||||
`entry_type` text NOT NULL,
|
||||
`title` text,
|
||||
`body_markdown` text NOT NULL,
|
||||
`metadata` text,
|
||||
`created_at` text NOT NULL,
|
||||
`updated_at` text NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `research_journal_ticker_idx` ON `research_journal_entry` (`user_id`, `ticker`, `created_at`);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `research_journal_accession_idx` ON `research_journal_entry` (`user_id`, `accession_number`);
|
||||
@@ -43,6 +43,13 @@
|
||||
"when": 1772668800000,
|
||||
"tag": "0005_financial_taxonomy_v3",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 6,
|
||||
"version": "6",
|
||||
"when": 1772830800000,
|
||||
"tag": "0006_coverage_journal_tracking",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user