YeetCode
Guides

Adding Tables

How to add a new database table with a model and triggers.

A short recipe for adding a new table to the Convex schema, creating a model for it, and wiring up triggers.

What You'll Do

  • Define a new table in schema.ts
  • Create a model file in models/
  • Register a trigger in triggers.ts
  • Write queries and mutations that use the model

On this page