How D1 work with Drizzle ORM?

I created a svelte repo using create cloudflare cli.

I found

import { defineConfig } from 'drizzle-kit';
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');

export default defineConfig({
    schema: './src/lib/server/db/schema.ts',

    dbCredentials: {
        url: process.env.DATABASE_URL
    },

    verbose: true,
    strict: true,
    dialect: 'sqlite'
});


for the drizzle config. Isn't only for local sqlite db, isn't? How can I config for production D1 database? I know I have to configure D1 in wrangler file. But there is no need to configure d1 database inside drizzle config file? How about generate and migrate?
Was this page helpful?