refactor(THU-739): drop legacy modes table - #1186
Draft
arienemaiara wants to merge 1 commit into
Draft
Conversation
Semgrep Security ScanNo security issues found. |
PR Metrics
Updated Fri, 07 Aug 2026 18:13:13 GMT · run #2630 |
| @@ -0,0 +1,5 @@ | |||
| -- This Source Code Form is subject to the terms of the Mozilla Public | |||
Collaborator
There was a problem hiding this comment.
could we merge these two migration files into a single one?
Base automatically changed from
THU-739/remove-mode-table-and-any-related-legacy-code
to
main
August 7, 2026 17:55
- Add migration 0026 dropping powersync.modes and chat_threads.mode_id - Remove modes from backend powersync schema
arienemaiara
force-pushed
the
THU-739/drop-modes-table
branch
from
August 7, 2026 18:06
8b295de to
2c8772a
Compare
|
Preview environment deployed 🚀
Stack: Auto-destroys on PR close/merge. Login via the bundled Keycloak realm — |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
THU-739, PR 2 of 2. The backend teardown for the removed chat-modes feature, now that PR #1181 stopped syncing it. Drops the
modestable and the deadchat_threads.mode_idcolumn (a FK-like reference to it; nothing reads or writes it). PR 1 kept the backend defs so the postgres objects survived until the PowerSync service rolled off themodessync rule; this PR removes them.Changes
backend/src/db/powersync-schema.ts— removed themodesTabledefinition and thechat_threads.modeIdcolumn.backend/drizzle/0026_overconfident_silvermane.sql— one migration for both drops:_journal.json/ snapshot — migration metadata (idx 26).Run this migration only after the Render
powersyncservice has been rolled onto the image from PR #1181 (sync rules no longer referencepowersync.modes). Dropping the table while the service still replicates it breaks replication.Testing
bun db generate→ "No schema changes" (snapshot consistent, no drift).modesTable/modeIdrefs).powersync.test.ts→ 25 pass (test DB applied the migration; the legacy accept-and-ignore case still passes).