Skip to content

Ignore Django SQLite WAL files in the Python template - #4947

Merged
dooleydevin merged 1 commit into
github:mainfrom
Jiashuo-Hu:fix-django-sqlite-wal-ignore
Nov 24, 2026
Merged

dooleydevin merged 1 commit into
github:mainfrom
Jiashuo-Hu:fix-django-sqlite-wal-ignore

Conversation

@Jiashuo-Hu

Copy link
Copy Markdown
Contributor

Link to the application or project's homepage

Django

Reasons for making this change

The Python template already ignores Django's default SQLite database and its rollback journal. With write-ahead logging enabled, SQLite creates the companion files db.sqlite3-wal and db.sqlite3-shm. Git currently lists both as untracked while the database is open. Add the two exact basenames alongside the existing Django entries.

Verified on Windows with an open SQLite WAL connection. Before the change, git check-ignore returned 1 for both generated files. After the change, it returned 0 for both. The database and rollback-journal rules still matched, and a differently named WAL file remained eligible for tracking.

Links to documentation supporting these rule changes

Merge and Approval Steps

Prepared and tested with OpenAI Codex. The account owner authorized submission.

@Jiashuo-Hu
Jiashuo-Hu requested a review from a team as a code owner November 24, 2026 03:46
Copilot AI adaptive review requested due to automatic review settings November 24, 2026 03:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The update adds the missing Django SQLite WAL and shared-memory ignore patterns while preserving the existing database and rollback-journal rules, with no active review issues identified.

No open issues 🎉

What changed in this PR

Updates the Python gitignore template to exclude Django SQLite write-ahead logging companion files while preserving the existing database and rollback-journal rules.

Changes:

  • Adds exact ignore patterns for db.sqlite3-wal and db.sqlite3-shm.
  • Keeps the additions alongside the existing Django SQLite entries.
File Description
Python.gitignore Adds exact ignore entries for Django SQLite WAL and shared-memory files.

Review effort: Lite (adaptive)

@dooleydevin dooleydevin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@dooleydevin
dooleydevin merged commit a8d489f into github:main Nov 24, 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.

3 participants