Skip to content

chore: collapse drizzle snapshots in diffs and CodeRabbit reviews - #81

Merged
BIA3IA merged 1 commit into
mainfrom
chore/collapse-drizzle-snapshots
Oct 30, 2026
Merged

BIA3IA merged 1 commit into
mainfrom
chore/collapse-drizzle-snapshots

Conversation

@toto04

@toto04 toto04 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Every migration comes with drizzle/meta/NNNN_snapshot.json, a full copy of the schema (~2,500 lines) that drizzle-kit diffs against to write the next migration. Nothing reads them at runtime. They drown out the .sql migration in reviews.

  • .gitattributes: drizzle/meta/*_snapshot.json linguist-generated=true -diff
    • GitHub collapses snapshots in "Files changed".
    • Local git diff prints one line per snapshot; git diff --text still shows the content.
    • Merges are unchanged: the files are still merged as text.
    • _journal.json and the .sql migrations are untouched.
  • .coderabbit.yaml: path_filters: ["!drizzle/meta/*_snapshot.json"], so CodeRabbit reviews the migrations, not the snapshots.
    • inheritance: true keeps every setting made in the CodeRabbit UI; without it, a repo file replaces them.

Same change as PoliNetworkOrg/backend#108.

drizzle-kit writes a full copy of the schema with every migration. Mark the snapshots as generated so GitHub collapses them and local diffs show one line, and keep CodeRabbit on the .sql migrations. The CodeRabbit file inherits the UI settings, so nothing else changes.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a7e2cf1 and 0cde581.

Files selected for processing: 2
  • .coderabbit.yaml
  • .gitattributes

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The configuration enables inheritance and excludes Drizzle snapshot JSON files from CodeRabbit review. Git attributes mark those files as generated and exclude them from local diff output. Merges continue to treat them as text.

Changes

Drizzle snapshot handling

Layer / File(s) Summary
Snapshot review and diff settings
.coderabbit.yaml, .gitattributes
CodeRabbit review filters exclude Drizzle snapshot JSON files. Git attributes mark them as generated and exclude them from local diff output, while merges continue to treat them as text.

Priority: Low

Change: Other

Merge Risk: Minimal · up to 0cde5

The change suppresses snapshot diffs while preserving text merges and excludes only the intended generated snapshots from review.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "chore: collapse drizzle snapshots in diffs and CodeRabbit reviews" matches the main change. The PR marks drizzle/meta/*_snapshot.json as generated in .gitattributes so GitHub and local git …
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore: collapse drizzle snapshots in diffs and CodeRabbit reviews" matches the main change. The PR marks drizzle/meta/*_snapshot.json as generated in .gitattributes so GitHub and local git diff collapse them, and it adds a CodeRabbit path_filters exclusion for the same files in .coderabbit.yaml. The title is specific, concise, and free of file lists or vague terms.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BIA3IA
BIA3IA merged commit a1384bf into main Oct 30, 2026
2 checks passed
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.

2 participants