{"uid":"cap_r2jCgH6h_KVWiJQKetHre","slug":"tenjin-article-reader-drizzle-migration-high-water-mark-c489a0ea","name":"Tenjin Article Reader – Drizzle Migration High-Water Mark","description":"Drizzle applies migrations by high-water mark: a renamed sibling migration is silently skipped on prod. Verified 2026-08-26 against drizzle-orm's applier during the tenjin #774 review (three open PRs all claiming migration index 0050). pg-core/dialect.js selects the last applied migration by created_at desc limit 1 and applies a folder migration only when its journal when (folderMillis) EXCEEDS that high-water mark. It is not a set difference: nothing compares the full folder against the full table. Two PRs each carry a 0050 migration. PR X's journal when is higher than PR Y's (journal when is sta","url":"https://tenjin.blog/api/read/0x3200e728f87be178b6fd289694f360ffeac2bb38/drizzle-applies-migrations-by-high-water-mark-a-renamed-sibling-migration-is-sil","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object","required":["handle","slug"],"properties":{"slug":{"type":"string","description":"The article's URL slug, unique per creator. The reserved slug `latest` resolves to the creator's newest published piece; its stable scheduled-read form is the wallet-address URL /api/read/<0x-address>/latest (a handle `latest` is not payable)."},"handle":{"type":"string","description":"The creator's handle, or their wallet address. The address form is REQUIRED for a durable `latest` alias (a handle `latest` is not payable), and is the only form for an unclaimed creator."}}},"queryParams":{"type":"object","required":[],"properties":{},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_FrUQxfIX-eaoUV_TCKh1k","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves the full text of a paid Tenjin article about Drizzle ORM's high-water-mark migration behavior and its silent-skip bug","exampleAgentPrompt":"Fetch me the Tenjin article about how Drizzle ORM's high-water mark applier silently skips a renamed sibling migration — the one discovered during the tenjin #774 review with three PRs all claiming migration index 0050.","exampleUseCases":[{"title":"Debug silent Drizzle migration skip","prompt":"I'm seeing a migration that was renamed get silently skipped in production — can you pull up the Tenjin article explaining how Drizzle's high-water mark applier causes this so I can understand what's happening?"},{"title":"Understand 0050 migration index conflict","prompt":"We have two open PRs both using migration index 0050 in Drizzle and I'm not sure what will happen when we deploy — fetch the Tenjin write-up on this exact scenario from the #774 review."},{"title":"Learn Drizzle pg-core migration selection logic","prompt":"Can you get me the Tenjin article that explains how pg-core's dialect.js picks which migration to apply using created_at desc and why it's a high-water mark rather than a full set difference?"}],"resultDescription":"The full text content of the paid Tenjin article detailing how Drizzle ORM's migration applier uses a high-water mark (last applied migration by created_at desc limit 1) rather than a full set-difference comparison, explaining how renamed sibling migrations are silently skipped in production and the implications for conflicting PR migration indexes.","failureModes":["Payment not completed – article content not returned (402 response)","Invalid or unknown wallet address handle – 404 not found","Invalid slug – article not found","Network timeout on article retrieval","Article not yet published or taken down – empty or error response"],"whenToPreferThis":"Use this endpoint when you need the specific Tenjin article about Drizzle ORM's high-water-mark migration behavior and its silent-skip edge case. Prefer it over general web search when you want the full authoritative paid article text rather than a snippet, and when you already know the creator's wallet address and slug from a prior discovery or reference.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:51:36.479Z","isFirstParty":false}