Repository navigation
REFACTOR: Move storage metadata and search to Postgres #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b5c3167
de190ac
6c662b0
6343c21
345d464
8958123
0477bda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,8 +57,8 @@ key-only run can conclude at best INCONCLUSIVE — never PASS. | |
| repo, or `wrangler deployments list --env production` when wrangler | ||
| is authenticated) plus the current UTC time. | ||
| - **[M]** If wrangler is available: confirm the production env lists DB | ||
| (D1), BUCKET (R2), AUTH_GUARD (KV), AI (Workers AI), and VECTORIZE | ||
| bindings (`wrangler deploy --dry-run --env production` output). Without | ||
| (D1), BUCKET (R2), AUTH_GUARD (KV), HYPERDRIVE (Postgres), and AI | ||
| (Workers AI) bindings (`wrangler deploy --dry-run --env production` output). Without | ||
|
Comment on lines
+60
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win Documentation still references D1 after the binding removal. This PR removes the D1 binding and moves canonical storage to Postgres, but two documents still describe D1 as a required resource.
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| wrangler this mandatory check is SKIPPED and the run cannot PASS. | ||
|
|
||
| ## 2. Authentication | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| -- migrate:up | ||
| -- Keep literal metadata lexemes, and give every field the same English | ||
| -- normalization so one query can match terms spanning metadata and body. | ||
| -- Merge each field's canonical vector text to retain original positions: | ||
| -- tsvector concatenation would shift aliases and create synthetic phrases. | ||
| -- PostgreSQL rewrites existing generated values and maintains the GIN index. | ||
| ALTER TABLE search_documents ALTER COLUMN tsv SET EXPRESSION AS ( | ||
| (setweight(to_tsvector('simple', name), 'A')::text | ||
| || ' ' || setweight(to_tsvector('english', name), 'A')::text)::tsvector | ||
| || (setweight(to_tsvector('simple', tags), 'B')::text | ||
| || ' ' || setweight(to_tsvector('english', tags), 'B')::text)::tsvector | ||
| || setweight(to_tsvector('english', body), 'C') | ||
| ); | ||
|
|
||
| -- migrate:down | ||
| ALTER TABLE search_documents ALTER COLUMN tsv SET EXPRESSION AS ( | ||
| setweight(to_tsvector('simple', name), 'A') | ||
| || setweight(to_tsvector('simple', tags), 'B') | ||
| || setweight(to_tsvector('english', body), 'C') | ||
| ); |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mandatory binding list still requires
DB (D1), but the production Worker now declaresHYPERDRIVEand has no D1 binding. A valid Postgres deployment therefore fails this verification check solely becauseDBis absent. This is non-blocking for the deployed Worker, but it prevents a passing deployment report; removeDB (D1)from the expected bindings.Knowledge Base Used: Runtime configuration and schema
Artifacts
Postgres binding-check fixture
Postgres binding-check output
Prompt To Fix With AI