DbProxy - Clarify internal table filtering in schema export#2856
Merged
DbProxy - Clarify internal table filtering in schema export#2856
Conversation
Replace opaque SQL LIKE patterns with named TypeScript predicates that explicitly document which tables are excluded (sqlite_*, _cf_* DO KV backing tables, __drizzle_migrations).
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.5-2026-04-23 · 327,696 tokens |
alex-alecu
approved these changes
Apr 28, 2026
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.
Summary
Refactors
AppDbDO.getSchema()inservices/db-proxy/src/app-db-do.tsto make the filtering of internal tables and indexes explicit and self-documenting. Replaces opaque SQLLIKE/ESCAPEpatterns with named static predicatesisInternalTableNameandisInternalIndexName, with a JSDoc comment spelling out exactly which tables are excluded and why (sqlite_*SQLite-managed tables,_cf_*Cloudflare DO KV-API backing tables, and__drizzle_migrationsbookkeeping).No behavior change — only the previous
__\_%escape pattern (which matched__drizzle_migrationsbut would have missed other internal tables) is replaced with an equivalent, more explicit filter.Verification
_cf_*DO KV backing tables that were previously leaking through.Visual Changes
N/A
Reviewer Notes
name NOT LIKE '__\_%' ESCAPE '\\'to exclude__drizzle_migrations; the new filter matches that table by exact name and additionally excludes any_cf_*tables surfaced by the DO KV API. If any caller relies on_cf_*tables appearing ingetSchema()output, this changes their result set.private staticso they are only reachable throughAppDbDOand don't widen the DO's RPC surface.