fix: handle optional growth provider metadata
This commit is contained in:
@@ -29,6 +29,12 @@ CREATE TABLE IF NOT EXISTS growth_reports (
|
||||
completed_at timestamptz
|
||||
);
|
||||
-- statement-break
|
||||
ALTER TABLE growth_reports ADD COLUMN IF NOT EXISTS provider_request_id text;
|
||||
-- statement-break
|
||||
ALTER TABLE growth_reports ADD COLUMN IF NOT EXISTS estimated_cost text;
|
||||
-- statement-break
|
||||
ALTER TABLE growth_reports ALTER COLUMN deterministic_evidence DROP NOT NULL;
|
||||
-- statement-break
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS growth_reports_current_fingerprint_idx
|
||||
ON growth_reports (merchant_id, fingerprint)
|
||||
WHERE manual_refresh = false AND status IN ('QUEUED','ANALYZING','GENERATING','READY','PARTIAL');
|
||||
|
||||
Reference in New Issue
Block a user