From 02fa0f024db9de27e8894384415d013d98012cd9 Mon Sep 17 00:00:00 2001 From: David Nahodyl Date: Sat, 8 Jun 2024 16:49:07 -0400 Subject: [PATCH] moved sqlite to .data for stackblitz sqlite support --- .gitignore | 1 + drizzle.config.ts | 2 +- playground/{database => .data}/sqlite.db | Bin playground/database/index.ts | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename playground/{database => .data}/sqlite.db (100%) diff --git a/.gitignore b/.gitignore index 7a3eb22..06952e2 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ dist .nuxt .output .data +!playground/.data .vercel_build_output .build-* .netlify diff --git a/drizzle.config.ts b/drizzle.config.ts index 42011c1..755a1c3 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -7,6 +7,6 @@ export default { dialect: "sqlite", verbose: true, dbCredentials: { - url: "./playground/database/sqlite.db", + url: "./playground/.data/sqlite.db", }, } satisfies Config; diff --git a/playground/database/sqlite.db b/playground/.data/sqlite.db similarity index 100% rename from playground/database/sqlite.db rename to playground/.data/sqlite.db diff --git a/playground/database/index.ts b/playground/database/index.ts index 39c9bd3..9ec229d 100644 --- a/playground/database/index.ts +++ b/playground/database/index.ts @@ -2,7 +2,7 @@ import { drizzle, BetterSQLite3Database } from "drizzle-orm/better-sqlite3"; import Database from "better-sqlite3"; import registrations from "./schema/registrations"; -const sqlite = new Database("./playground/database/sqlite.db"); +const sqlite = new Database("./playground/.data/sqlite.db"); const config = { schema: { registrations },