DT
Drizzle Teamwhatplan
in drizzle.config.ts: "Cannot use import statement outside a module"
happens when I try to
push
env.mjs zod validates the raw process.env
any assistance is very much appreciated thanksMaston•356d ago
i think drizzle.config.ts gets compiled to a commonjs module so you cant import .mjs or any es6 modules
do you use a env.mjs for using it with a next.config.mjs like in create-t3-app ?
ryanagillie•351d ago
having the same problem here
Andrii Sherman•351d ago
@alexblokh is working on it
Will be included in next drizzle-kit release
ryanagillie•351d ago
ryanagillie•351d ago
Here's my error log if that helps
alexblokh•348d ago
with all bells and whistles, it's going to be a cjs bundle for kit with runtime cjs/esm support
ryanagillie•348d ago
those are words yes
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostsError when using Drizzle (Non-abstract class 'PgSelect<TTableName, TSelection, TSelectMode, [...])I'm getting the following error when I try to use Drizzle:
```> graphql-server@1.0.0 start
> npm runGenerate classes/interfaces from existing schemas?Messing around with drizzle, and I was wondering if there was any way to generate a class or interfaRelation Query - Get likes in postPlaying around with relational queries and I'm not quite getting how I'd retrieve the count of likesRelation query `extras` needs access to `with`I have a mysql table with two relations to another table. (one is for source values, one is for optiOptional filter param, coalesce to true?Is there a way to achieve this coalescing technique, but in valid drizzle sql?
```ts
const filterByRelational query, Planetscale throws: `ResourceExhausted desc = Out of sort memory`SOLUTION: the problem was that I had a json column storing a massive value on each row.
`code = ReInt to Float or Double db:pushHi we are working on a project that has drizzle db connected to a planetscale database. We initiallyTimestamp mode differences?What is the difference between the timestamp "mode" of "string'"and "date"?Many-to-Many Self RelationI'm looking to migrate from Prisma, but I'm having trouble trying to figure out how a many-to-many sRelations, three level nested where?Given a `User, Role, RoleToUser` many-to-many relation:
```ts
export const userRelations = relationHelp with this relational query?I am trying to get all the organizations that a member is associated with.
This code is working:
RQB | using specific fields from a query against relationsis there a way to create a select filter that matches specific fields from a relation?
say i `findMaSimulate enums with SQLite `CHECK()`I'm a heavy enum user in Postgres. Using SQLite now, wondering if anyone has come up with something Migrating from Prisma graduallyWe're in the middle of migrating away from Prisma to Drizzle which we just found out that Drizzle haselect with limit of 1Is there a cleaner way of selecting only one item with proper type safety than this?
```ts
const usOption filter parametersHi! Love using drizzle so far! Had a quick question (not a bug):
```
const res = await ctx.databHow to delete with cascade?I'm using postgres with the following schema (reduced to the important parts):
```
export const worPSQL SQL query does not workUnable to achieve it with Drizzle helpers - I had to write my query in plain SQL.
I'm trying to bu