Trying to get Drizzle, Lucia and Vercel-postress to work together (no changes to schema detected)
Hi! I'm new to drizzle and lucia and am just having a problem setting up both with vercel-postgres:
I'm creating an adapter for Lucia in my
schema.ts
:
export const createAdapter = (db: PgDatabase<any, any, any>) => new DrizzlePostgreSQLAdapter(db, sessionTable, userTable);
and using it in db/index.ts
. But this doesn't allow drizzle to see the session or user schemas (no changes are detected when I drizzle-kit push
)
Any ideas? Sorry if it's obvious!
Nick5 Replies
I have the exact same setup Drizzle, Lucia and Vercel PostgreSQL:
generate genereates the right migration files , but when I try to migrate i claims no changes were made the db deosn't get changed. Maybe it's a common isse?
When did you first have the problem? You make any headway with it?
Fixed by moving the adapter out of
schema.ts
and into db/index.ts
and importing the schemas.@Nick , good thta you solved it ! It's not related to my issue then. Mine is that Drizzles generates migrations byt doesn't apply them.
Yeah sorry I couldn't be more of a help
@Nick no worries. I solved it. Great education 😄 . Deleting migrations folder and table and using push to bypass migrations apparently solved the issue