Skip to content

Conversation

@adboio
Copy link
Contributor

@adboio adboio commented Nov 18, 2025

Problem

step 2 of 4 for this migration....

  1. adding int field feat(surveys): add linked_insight_id field #41689
  2. [this] adding FK column (no constraint)
  3. add FK constraint
  4. add index on field

this was previously approved as one big PR (#41574) but i had to split it up due to restrictive migration CI checks :(

this will also likely need a rebase, but just want to get approvals so i can pop it in the queue when ready

Changes

How did you test this code?

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Changelog: (features only) Is this feature complete?

Copy link
Contributor Author

adboio commented Nov 18, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

Migration SQL Changes

Hey 👋, we've detected some migrations on this PR. Here's the SQL output for each migration, make sure they make sense:

posthog/migrations/0912_alter_survey_linked_insight_type.py

BEGIN;
--
-- Custom state/database change combination
--
-- (no-op)
COMMIT;

Last updated: 2025-11-19 23:33 UTC (b54e6e3)

@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

🔍 Migration Risk Analysis

We've analyzed your migrations for potential risks.

Summary: 1 Safe | 0 Needs Review | 0 Blocked

✅ Safe

No contention risk, backwards compatible

posthog.0912_alter_survey_linked_insight_type
  └─ #1 ✅ SeparateDatabaseAndState: Only state operations (no database changes)

Last updated: 2025-11-19 23:33 UTC (b54e6e3)

@adboio adboio force-pushed the 11-18-feat_surveys_add_fk_constraint branch from 71dabc7 to 755e84f Compare November 18, 2025 20:00
@adboio adboio force-pushed the 11-18-feat_surveys_add_linked_insight_id_field branch from 5298d5d to 05ba8ee Compare November 18, 2025 20:00
@adboio adboio force-pushed the 11-18-feat_surveys_add_fk_constraint branch 2 times, most recently from d2d3fa8 to d402eb6 Compare November 18, 2025 20:16
@graphite-app graphite-app bot changed the base branch from 11-18-feat_surveys_add_linked_insight_id_field to graphite-base/41708 November 18, 2025 21:47
@adboio adboio force-pushed the 11-18-feat_surveys_add_fk_constraint branch from d402eb6 to 84e0972 Compare November 19, 2025 19:00
@adboio adboio force-pushed the graphite-base/41708 branch from 38f2bb7 to 258102b Compare November 19, 2025 19:00
@adboio adboio changed the base branch from graphite-base/41708 to master November 19, 2025 19:00
@adboio adboio force-pushed the 11-18-feat_surveys_add_fk_constraint branch 4 times, most recently from c934b85 to f69a7a5 Compare November 19, 2025 22:38
@adboio adboio marked this pull request as ready for review November 19, 2025 22:41
@posthog-bot posthog-bot requested a review from a team November 19, 2025 22:41
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link
Contributor

@adamleithp adamleithp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low context stamp

@adboio adboio changed the title feat(surveys): add FK constraint for linked_insight_id feat(surveys): add FK for linked_insight_id Nov 19, 2025
@adboio adboio force-pushed the 11-18-feat_surveys_add_fk_constraint branch from f69a7a5 to 23c72bf Compare November 19, 2025 23:07
@adboio adboio enabled auto-merge November 19, 2025 23:10
@adboio adboio added this pull request to the merge queue Nov 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2025
@adboio adboio added this pull request to the merge queue Nov 20, 2025
Merged via the queue into master with commit a411ae9 Nov 20, 2025
171 checks passed
@adboio adboio deleted the 11-18-feat_surveys_add_fk_constraint branch November 20, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants