Make chat_backend migrations a single chain #77

Merged
westfarn merged 1 commits from feat/linear-migrations into master 2026-10-19 01:08:54 -07:00
Owner

Summary

  • Closes #76.
  • 0034_waitlistentry and 0034_customuser_use_conversation_context both depended on 0033_agentrun_agentstep, so the graph had two leaves.
  • Waitlist is now 0035_waitlistentry and depends on 0034_customuser_use_conversation_context. One leaf: 0035_waitlistentry.

Deploy note

If django_migrations already has a row named 0034_waitlistentry, rename it before migrate:

UPDATE django_migrations
SET name = '0035_waitlistentry'
WHERE app = 'chat_backend' AND name = '0034_waitlistentry';

Then run migrate. A database that never applied 0034_waitlistentry can migrate as usual.

Test plan

  • chat_backend.tests.test_migration_graph asserts a single leaf and the new parent.
  • chat_backend.tests.test_public_marketing still passes.
  • On a database that already applied both 0034 siblings, run the rename SQL, then migrate, and confirm no InconsistentMigrationHistory.
## Summary - Closes #76. - `0034_waitlistentry` and `0034_customuser_use_conversation_context` both depended on `0033_agentrun_agentstep`, so the graph had two leaves. - Waitlist is now `0035_waitlistentry` and depends on `0034_customuser_use_conversation_context`. One leaf: `0035_waitlistentry`. ## Deploy note If `django_migrations` already has a row named `0034_waitlistentry`, rename it before migrate: ```sql UPDATE django_migrations SET name = '0035_waitlistentry' WHERE app = 'chat_backend' AND name = '0034_waitlistentry'; ``` Then run migrate. A database that never applied `0034_waitlistentry` can migrate as usual. ## Test plan - [x] `chat_backend.tests.test_migration_graph` asserts a single leaf and the new parent. - [x] `chat_backend.tests.test_public_marketing` still passes. - [ ] On a database that already applied both 0034 siblings, run the rename SQL, then `migrate`, and confirm no `InconsistentMigrationHistory`.
westfarn added 1 commit 2026-10-18 19:30:01 -07:00
Make chat_backend migrations a single chain.
CI / test (pull_request) Successful in 10s
Unit Tests / test (pull_request) Successful in 9s
b47da073f9
0034_waitlistentry and 0034_customuser_use_conversation_context both depended on 0033, so the graph had two leaves. Waitlist is now 0035 and depends on the customuser migration.

Closes #76
westfarn merged commit bb5c43a4e7 into master 2026-10-19 01:08:54 -07:00
westfarn deleted branch feat/linear-migrations 2026-10-19 01:08:54 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_backend#77