That's not the error you're getting though: `FOREIGN KEY constraint failed`
That's not the error you're getting though:
FOREIGN KEY constraint failedFOREIGN KEY constraint failed




wrangler d1 info <dbname> will tell youwrangler d1 info <dbname> for that DB?Failed to reach database. Please try again later. and when trying to access the url, it says the DB has just been successfully created. Any tips?//hooks.server.ts
import { drizzle } from 'drizzle-orm/d1';
const injectD1 = async (event: RequestEvent<Partial<Record<string, string>>, string | null>) => {
try {
if (event.platform?.env?.DATABASE) {
event.locals.DRIZZLE = drizzle(event.platform.env.DATABASE);
event.locals.D1 = event.platform.env.DATABASE;
}
...
} catch (error) {
console.log('🚀 ~ file: hooks.server.ts:27 ~ consthandle:Handle= ~ error:', error);
}
};