Multiple files schemas with query to Access data
I want to use query but I heard you have to import every schemas to use query.
Is there a way to import every files in that folder instead of doing this below:
According to docs. ^^^
I have drizzle. config.ts like this already :
Why cant I just do
(basically, this wont work anymore without {schema} so I cant do db.query.user)
instead of importing every schemas with specific file name any way to do this?
1 Reply
you could create a file to aggregate all your schemas. This file would simply re-export each and every separate schema you have, then all you have to do in every instance is to import this one file:
schema.ts