Skip to main content
Prisma banner

Prerequisites

Before you start, make sure you:
1

Install the libSQL SDK and its Prisma driver

2

Retrieve database credentials

Get the database URL:
Get the database authentication token:
Assign credentials to the environment variables inside .env.
3

Enable the `driverAdapters` preview feature flag:

prisma/schema.prisma
4

Generate Prisma client

5

Update your Prisma Client Instance

6

Database Migrations

Prisma Migrate and Introspection workflows are currently not supported when working with Turso — learn more.First, generate a migration file using prisma migrate dev against a local SQLite database
Then, apply the migration to your Turso database using the Turso’s CLI
Replace 20230922132717_init with the name of your migration created from the npx prisma migrate dev command.
7

Query