Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/tender-experts-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Remove insight_goal_id references following migration 166 column drop.
1 change: 0 additions & 1 deletion server/src/addie/services/proactive-outreach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ async function initiateOutreach(candidate: OutreachCandidate): Promise<OutreachR
const outreach = await insightsDb.recordOutreach({
slack_user_id: candidate.slack_user_id,
outreach_type: outreachType,
insight_goal_id: goal?.id,
dm_channel_id: channelId,
initial_message: message,
variant_id: variant.id,
Expand Down
7 changes: 2 additions & 5 deletions server/src/db/insights-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export interface MemberOutreach {
id: number;
slack_user_id: string;
outreach_type: OutreachType;
insight_goal_id: number | null;
thread_id: string | null;
dm_channel_id: string | null;
initial_message: string | null;
Expand Down Expand Up @@ -149,7 +148,6 @@ export interface CreateVariantInput {
export interface CreateOutreachInput {
slack_user_id: string;
outreach_type: OutreachType;
insight_goal_id?: number;
thread_id?: string;
dm_channel_id?: string;
initial_message?: string;
Expand Down Expand Up @@ -808,14 +806,13 @@ export class InsightsDatabase {
async recordOutreach(input: CreateOutreachInput): Promise<MemberOutreach> {
const result = await query<MemberOutreach>(
`INSERT INTO member_outreach (
slack_user_id, outreach_type, insight_goal_id, thread_id, dm_channel_id,
slack_user_id, outreach_type, thread_id, dm_channel_id,
initial_message, variant_id, tone, approach
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
RETURNING *`,
[
input.slack_user_id,
input.outreach_type,
input.insight_goal_id || null,
input.thread_id || null,
input.dm_channel_id || null,
input.initial_message || null,
Expand Down