Quotura
Quotura is launching soon. Sign-up opens at launch; until then, these pages describe the service as it will run. Get notified

How to move from Prisma to the Facet ORM

Moving from Prisma to Facet is mostly a schema port, because the syntax is close. Copy your models into schema.facet, run facet db pull against the existing database to check the result, mark the current state as the baseline with facet migrate resolve, then regenerate the client and update imports.

Last reviewed

Steps

  1. Run facet init in your project and copy your models and enums into schema.facet.
  2. Run facet db pull against your database and compare its output with your port.
  3. Create a baseline migration and mark it applied with facet migrate resolve --applied <name>.
  4. Run facet generate, switch imports to the generated client, and run your tests.

What changes in queries?

Common calls such as findMany, findUnique, create, update, upsert, delete, include and select work the same way. Review raw queries and any Prisma-specific extensions.

Frequently asked questions

Do I need to move my data?

Not if the database stays where it is. If you are also moving to Quotura, use the Import tab in the console, which copies the database server to server (see the guide on moving a Postgres database to Quotura).