Silvan
Explore posts from serversDTDrizzle Team
•Created by Silvan on 3/26/2025 in #help
Durable Object example weird import
Here in thd docs https://orm.drizzle.team/docs/connect-cloudflare-do
There is the following import
import migrations from '../drizzle/migrations';
which i dont get?
Inside my drizzle folder i have the migration files .sql and a meta folder. Where does the migrations file come from?
I did see the
We need rules so we can import migrations in the next steps
```toml
[[rules]]
type = "Text"
globs = ["**/.sql"]
fallthrough = true
```
But do i need to run some command first?11 replies
CDCloudflare Developers
•Created by Silvan on 2/27/2025 in #workers-help
D1 adding more latency than expected
Im using sveltekit and i created 2 test routes. they essentially do the same but one does a select 1; in d1.
When warm the the difference in response time is 50ms which just seems super high considering the query takes less than 1ms.
I chose the cloest location to me when i created d1
I use workers with assets. here the code for both api endpoints i used to just test it out
Is this really the expected behaviour?
No Db:
With D1:
i tried without drizzle as well but i dont see a difference
5 replies
CDCloudflare Developers
•Created by Silvan on 2/24/2025 in #workers-help
How to debug "EvalError: Code generation from strings disallowed for this context"
Im aware that this is caused by eval and new Function. i moved my entire validation to https://www.npmjs.com/package/@cfworker/json-schema because i thought it was that. but it wasnt
im using worker assets with sveltekit. i checked the _workers.js but its really small and no eval or new Function there
4 replies
BABetter Auth
•Created by Silvan on 2/19/2025 in #help
DrizzleThe model "verification" was not found in the schema object. Please pass the schema
I just followed the installation + sveltekit guide.
Clicking the login action gives me a 500 on
http://localhost:5173/api/auth/sign-in/social
Server error is ERROR [Better Auth]: BetterAuthError [BetterAuthError: [# Drizzle Adapter]: The model "verification" was not found in the schema object. Please pass the schema directly to the adapter options.] {
cause: undefined
}
the tables exist i can query them too.
my hooks.server.ts
now it asks me to pass the schema. but drizzle schemas are usually just exported tables. theres no default export or what am i missing?4 replies
BABetter Auth
•Created by Silvan on 1/29/2025 in #help
CLI cant generate using SvelteKits $app import
So i just followed the guide. when i tried generating the db things i run into
ERROR [Better Auth]: [#better-auth]: Couldn't read your auth config. Error: Cannot find module '$app/environment'
not entirely sure why this dosent work in the cli? i could use vite env stuff but still weird error imo4 replies
CDCloudflare Developers
•Created by Silvan on 1/12/2025 in #pages-help
Recommended Project structure for Pages + Durable Objects + ..
So im currently running into the issue that i cant really get sveltekit + durable objects up.
I used the cf starter cli for sveltekit that worked all fine. but as soon as i add the do binding and run dev again i get no response.
I have a DoClass exported somewhere in my project but i feel like its just wrong.
I found this repo. In his case he splits the Pages with the Worker based things (monorepo). Is this the recommended approach?
https://github.com/harshil1712/votes-app-demo
6 replies
DTDrizzle Team
•Created by Silvan on 11/5/2024 in #help
How to set PRAMGA for Sqlite
Really not sure how this would be done here. Some of them are permanent but some need to be set on every connection. in my example something like:
PRAGMA foreign_keys = ON;
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA mmap_size = 134217728;
PRAGMA journal_size_limit = 67108864;
PRAGMA cache_size = -2000;
Where would i set these?
4 replies