d1 import: fix Postgres SSL default, D1 metadata table, verify errors - #1433
Open
claude[bot] wants to merge 1 commit into
Open
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
- Default sslrootcert=system for the destination Postgres role so verify-full mode doesn't fall back to a missing ~/.postgresql/root.crt. - Exclude Cloudflare's _cf_METADATA table using the existing ORM/metadata table exclusion mechanism, so it's skipped during schema conversion, data load, and verify like other internal bookkeeping tables. - Wrap the row-fetch error in postgresRowSignature with the table and primary key context, matching tableFingerprintFromPostgres. - Backfill opts.InputPath from saved migration state when --sqlite is passed explicitly, since Verify() needs InputPath regardless. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MjeJgHVQNc5nQc15Yb9dNB
no-itsbackpack
marked this pull request as ready for review
September 19, 2026 16:02
mscoutermarsh
approved these changes
Sep 19, 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.
<!-- ccr-slack-attribution -->
Requested by Elom Gomez
Summary
Four small fixes to the D1 (Cloudflare) → Postgres import/verify path:
sslmode=verify-fullwith nosslrootcert, so libpq fell back to~/.postgresql/root.crt, which usually doesn't exist. Now defaultssslrootcert=system._cf_METADATAis now excluded from schema conversion, data load, and verification, via the same exclusion mechanism already used for ORM bookkeeping tables (e.g._prisma_migrations).--sqliteinput path: passing--sqliteexplicitly toverifyno longer skips backfilling the dump's input path from saved migration state, since verification needs it later regardless.Test plan
go build ./...,go vet ./...,go test ./internal/import/d1/...--sqliteinput-path backfill.🤖 Generated with Claude Code
https://claude.ai/code/session_01MjeJgHVQNc5nQc15Yb9dNB