Skip to content

feat(control-plane): version data import table naming - #1022

Draft
EDsCODE wants to merge 2 commits into
mainfrom
codex/data-import-table-naming-version
Draft

feat(control-plane): version data import table naming#1022
EDsCODE wants to merge 2 commits into
mainfrom
codex/data-import-table-naming-version

Conversation

@EDsCODE

@EDsCODE EDsCODE commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

Existing organizations need to keep the data-import table names they already use, while newly provisioned organizations should use the copy workflow naming format. The naming choice must be stable at organization scope and available to PostHog writers.

Changes

  • Add an organization-level data_imports_table_naming_version with legacy_batch_v1 and copy_v1 values.
  • Backfill existing organizations to legacy_batch_v1, then make copy_v1 the database default for organizations created after the migration.
  • Return the organization policy from GET /api/v1/orgs/:id/teams alongside the team rows.
  • Add migration coverage for fresh databases, upgrades, and the existing-versus-new default boundary.

Important

Deploy this before PostHog/posthog#76032. Any deliberate exceptions should be applied as operator-managed organization configuration after this migration and before the PostHog writers deploy.

Tests

  • just test-controlplane
  • just test-configstore-integration
  • just lint

Agent context

Codex implemented this as a human-directed change. The migration intentionally separates the backfill value from the post-migration default so existing and newly provisioned organizations take different policies without hard-coded tenant data.

@EDsCODE EDsCODE self-assigned this Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Test Impact Plan

Deterministic summary of how this PR changes tests, CI runners, and coverage-risk signals.

Summary

Area Added Changed Deleted
Test files 0 2 0
E2E/journey files 0 0 0
Workflow files 0 0 0

Signals

  • Test cases: +1 / -0
  • Assertions: +11 / -0
  • Skips or known failures added: 0
  • Workflow continue-on-error added: 0
  • Workflow path filters added: 0
  • Test commands removed from justfile: 0
  • E2E/journey retry lines added: 0

Coverage risk: neutral or increased

No coverage-reduction warnings detected.

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.

1 participant