Migrate legacy research record status columns#83
Conversation
Deploying website with
|
| Latest commit: |
70a0bd4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bc9b6e83.website-bks.pages.dev |
| Branch Preview URL: | https://codex-research-legacy-schema.website-bks.pages.dev |
Deploying secopsai with
|
| Latest commit: |
70a0bd4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://89fd87ef.secopsai.pages.dev |
| Branch Preview URL: | https://codex-research-legacy-schema.secopsai.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70a0bd42c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ON registry_snapshots (collector_id, created_at DESC); | ||
| """ | ||
| ) | ||
| for table in ("research_subjects", "research_evidence", "research_iocs"): |
There was a problem hiding this comment.
Migrate legacy research_rules before indexing status
For a long-lived database that already has a legacy research_rules table without the lifecycle status column, init_db() still fails before reaching this loop because the earlier CREATE INDEX idx_research_rules_case_type ON research_rules (case_id, rule_type, status) references the missing column. This leaves Research Cases broken for legacy deployments with detection rules; include research_rules.status in the migration and run that migration before creating indexes that depend on it.
Useful? React with 👍 / 👎.
Summary
Verification