Skip to content

Commit 01db66b

Browse files
committed
Index database migrations by default
1 parent 5e7ddd0 commit 01db66b

4 files changed

Lines changed: 6 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ output = ".ctxt/ctx_index.json"
293293
synonym_cache = ".ctxt/ctx_cache.json"
294294
batch_size = 8 # names per LLM request; 0 enables smart batching
295295
synonyms_max = 12 # max synonyms per name
296-
ignore = [".git", ".venv", "site-packages", "__pycache__", "node_modules", "vendor", "dist", "migrations", "pb_migrations", "alembic", "flyway"]
296+
ignore = [".git", ".venv", "site-packages", "__pycache__", "node_modules", "vendor", "dist"]
297297
dot_whitelist = [] # extra dot files to keep (merged with built-in defaults)
298298
verbose = true
299299

@@ -319,10 +319,12 @@ the configuration; `endpoint` and `model` control the request.
319319

320320
Contexting loads common `.gitignore` patterns by default. Additional ignores come from:
321321

322-
1. **Built-in defaults** — `.git`, `.venv`, `site-packages`, `__pycache__`, `node_modules`, `vendor`, `dist`, `migrations`, `pb_migrations`, `alembic`, `flyway`
322+
1. **Built-in defaults** — `.git`, `.venv`, `site-packages`, `__pycache__`, `node_modules`, `vendor`, `dist`
323323
2. **`.gitignore` patterns** — loaded from the project root
324324
3. **`ignore` in config** — extra patterns merged with defaults
325325

326+
Database migration folders (`migrations`, `pb_migrations`, `db/migrate`, `alembic`, and `flyway`) are indexed unless your `.gitignore` or config excludes them. Older starter configs explicitly ignored migration folders; remove those entries from the config's `ignore` list and run `ctxt init .` to include them in a rebuilt index.
327+
326328
Root `.gitignore` rules support ordered negation (`!path`), rooted patterns,
327329
directory-only patterns, and `**` globs. Negation can undo earlier Git rules,
328330
but cannot re-include an excluded parent directory or override built-in/config

‎config_template.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ synonym_cache = ".ctxt/ctx_cache.json"
66
batch_size = 8 # names per batch; smaller = faster individual requests
77
synonyms_max = 12 # max synonyms per name
88
symbol_extractor = "auto" # "auto", "treesitter", or "regex"
9-
ignore = [".git", ".venv", "site-packages", "__pycache__", "node_modules", "vendor", "dist", "migrations", "pb_migrations", "alembic", "flyway"]
9+
ignore = [".git", ".venv", "site-packages", "__pycache__", "node_modules", "vendor", "dist"]
1010
# Extra dot files to keep (merged with built-in defaults like .prettierrc, .editorconfig, etc.)
1111
# dot_whitelist = [".env.local", ".env.production"]
1212
verbose = true

‎context.toml.example‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ output = ".ctxt/ctx_index.json"
33
synonym_cache = ".ctxt/ctx_cache.json"
44
batch_size = 8 # names per batch; 0 enables smart batching
55
synonyms_max = 12 # max synonyms per name
6-
ignore = [".git", ".venv", "site-packages", "__pycache__", "node_modules", "vendor", "dist", "migrations", "pb_migrations", "alembic", "flyway"]
6+
ignore = [".git", ".venv", "site-packages", "__pycache__", "node_modules", "vendor", "dist"]
77
# Extra dot files to keep (merged with built-in defaults like .prettierrc, .editorconfig, etc.)
88
dot_whitelist = []
99
verbose = true

‎ignore.go‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ var defaultIgnores = []string{
6161
"tmp",
6262
"temp",
6363

64-
// Database migrations (boilerplate, low search value)
65-
"migrations",
66-
"pb_migrations", // PocketBase
67-
"db/migrate", // Rails
68-
"alembic", // Python/Alembic
69-
"flyway", // Java/Flyway
70-
7164
// IDE
7265
".vscode",
7366
".idea",

0 commit comments

Comments
 (0)