Introspect Cloudflare D1

At the moment, is it possible to introspect Cloudflare D1 database to create the drizzle schema?
4 Replies
Marcel Overdijk
Marcel Overdijk8mo ago
I'm wondering the same... VScode is saying d1 is valid option for the driver config property:

import { defineConfig } from 'drizzle-kit';

export default defineConfig({
schema: "./src/model/schema.ts",
out: "./drizzle",
driver: 'd1',
dbCredentials: {
dbName: 'mydb',
wranglerConfigPath: '.',
},
});

import { defineConfig } from 'drizzle-kit';

export default defineConfig({
schema: "./src/model/schema.ts",
out: "./drizzle",
driver: 'd1',
dbCredentials: {
dbName: 'mydb',
wranglerConfigPath: '.',
},
});
But when running the introspect I get:
> drizzle-kit introspect:sqlite --config=drizzle.codegen.ts

Custom config path was provided, using 'drizzle.codegen.ts'
Reading config file '/Users/.../drizzle.codegen.ts'
Invalid input Either "turso", "libsql", "better-sqlite" are available options for "--driver"
> drizzle-kit introspect:sqlite --config=drizzle.codegen.ts

Custom config path was provided, using 'drizzle.codegen.ts'
Reading config file '/Users/.../drizzle.codegen.ts'
Invalid input Either "turso", "libsql", "better-sqlite" are available options for "--driver"
Marcel Overdijk
Marcel Overdijk8mo ago
Kevin Kipp
Going full-stack on Astro with Cloudflare D1 and Drizzle
A step-by-step guide to adding a back-end to your Astro project using Cloudflare D1 and Drizzle ORM
GitHub
How can I use Drizzle Studio with Cloudflare D1 in local environmen...
I am using Drizzle and Cloudflare D1 in my project and I like Drizzle a lot. And while I was trying Drizzle Studio, I found it connected to live database instead of local dev environment. I'd l...
Marcel Overdijk
Marcel Overdijk8mo ago
but unfortunately it didn't help a lot...
Marcel Overdijk
Marcel Overdijk8mo ago
I tried many things... also created this github issue: https://github.com/drizzle-team/drizzle-kit-mirror/issues/351
GitHub
d1 driver setting gives: Either "turso", "libsql", "better-sqlite...
Using "drizzle-kit": "^0.20.14" and the following config file: import { defineConfig } from 'drizzle-kit'; export default defineConfig({ schema: './src/model/schema....
Want results from more Discord servers?
Add your server