diff options
Diffstat (limited to 'docs/guides/ecosystem/drizzle.md')
-rw-r--r-- | docs/guides/ecosystem/drizzle.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/guides/ecosystem/drizzle.md b/docs/guides/ecosystem/drizzle.md index 6428b066c..5dbe21b1a 100644 --- a/docs/guides/ecosystem/drizzle.md +++ b/docs/guides/ecosystem/drizzle.md @@ -19,11 +19,11 @@ $ bun add -D drizzle-kit Then we'll connect to a SQLite database using the `bun:sqlite` module and create the Drizzle database instance. ```ts#db.ts -import { drizzle, BunSQLiteDatabase } from "drizzle-orm/bun-sqlite"; +import { drizzle } from "drizzle-orm/bun-sqlite"; import { Database } from "bun:sqlite"; const sqlite = new Database("sqlite.db"); -export const db: BunSQLiteDatabase = drizzle(sqlite); +export const db = drizzle(sqlite); ``` --- @@ -40,7 +40,7 @@ console.log(await db.get<string>(query)); --- -Then run `index.ts` with Bun. Bun wil automatically create `sqlite.db` and execute the query. +Then run `index.ts` with Bun. Bun will automatically create `sqlite.db` and execute the query. ```sh $ bun run index.ts @@ -68,7 +68,7 @@ export const movies = sqliteTable("movies", { We can use the `drizzle-kit` CLI to generate an initial SQL migration. ```sh -$ bunx drizzle-kit migrate:sqlite --schema ./schema.ts +$ bunx drizzle-kit generate:sqlite --schema ./schema.ts ``` --- @@ -92,11 +92,11 @@ This script creates a new connection to a SQLite database that writes to `sqlite ```ts#migrate.ts import { migrate } from "drizzle-orm/bun-sqlite/migrator"; -import { drizzle, BunSQLiteDatabase } from "drizzle-orm/bun-sqlite"; +import { drizzle } from "drizzle-orm/bun-sqlite"; import { Database } from "bun:sqlite"; const sqlite = new Database("sqlite.db"); -const db: BunSQLiteDatabase = drizzle(sqlite); +const db = drizzle(sqlite); await migrate(db, { migrationsFolder: "./drizzle" }); ``` |