feat(pitch-admin): backfill first_activity_at for existing investors
Build pitch-deck / build-push-deploy (push) Successful in 1m22s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 30s
CI / test-python-voice (push) Successful in 31s
CI / test-bqas (push) Successful in 31s
Build pitch-deck / build-push-deploy (push) Successful in 1m22s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 30s
CI / test-python-voice (push) Successful in 31s
CI / test-bqas (push) Successful in 31s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,11 @@ export async function POST(request: NextRequest) {
|
|||||||
`CREATE INDEX IF NOT EXISTS idx_pitch_investors_mask_check
|
`CREATE INDEX IF NOT EXISTS idx_pitch_investors_mask_check
|
||||||
ON pitch_investors (first_activity_at)
|
ON pitch_investors (first_activity_at)
|
||||||
WHERE first_activity_at IS NOT NULL AND data_masked_at IS NULL`,
|
WHERE first_activity_at IS NOT NULL AND data_masked_at IS NULL`,
|
||||||
|
// 004b — backfill first_activity_at for existing investors from last_login_at
|
||||||
|
`UPDATE pitch_investors
|
||||||
|
SET first_activity_at = last_login_at
|
||||||
|
WHERE last_login_at IS NOT NULL
|
||||||
|
AND first_activity_at IS NULL`,
|
||||||
`CREATE TABLE IF NOT EXISTS fp_scenarios (
|
`CREATE TABLE IF NOT EXISTS fp_scenarios (
|
||||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||||
name TEXT NOT NULL DEFAULT 'Base Case',
|
name TEXT NOT NULL DEFAULT 'Base Case',
|
||||||
|
|||||||
Reference in New Issue
Block a user