NicolasN
Convex Community4w ago
20 replies
Nicolas
@everyone In the 1.31.0 release of convex, we’re changing db.get/db.patch/db.replace/db.delete to a more ergonomic and safer syntax (that will also allow you to customize IDs in the future!)

❌ db.get(messageId)
✅ db.get("messages", messageId)

The change is backward compatible, but we recommend you to migrate your codebases. You can do so automatically using our ESLint plugin or a codemod tool that we built.

Learn more: https://news.convex.dev/db-table-name/
Convex News
TL;DR Starting from convex 1.31.0, the db.get, db.patch, db.replace, and db.delete functions take the table name as the first argument. The new API is safer and allows for more customization in the future. Existing code will still work, and you can migrate your
Why ctx.db is changing, and what you should do about it
Was this page helpful?