DT
Drizzle Teamedgahan
importing into schema.ts file
Hi,
I am using turborepo and I have defined my schema in
packages/schema/user.ts
and in my main API application apps/api/schema.ts
I import the user schema. I believe I have everything setup correctly in terms of package.json setup.
My problem is that when using running migrations only tables explicitly defined in schema.ts
seem to work.
(The above is just an example I've been trying with other tables, etc)
Any help appreciated. The drizzle.config.ts lives in the APIbloberenober•351d ago
edgahan•348d ago
@Dan Kochetov This has fixed my issue, now my
schema.ts
file simply has export * from "@company/schema";
which is defined in my schema package (in turborepo) <root>/packages/schema/index.ts
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 PostsWhat versions of MySQL are supported? I have JSON_ARRAYAGG issues with 5.7 and AWS Aurora ServerlessCan you confirm what versions of MySQL you intend on supporting? Relational queries with joins use J`$with` example in docs error "unsupported: with expression in select statement"I have a user with id of 42, just like the docs https://orm.drizzle.team/docs/crud#with-clause
but Infer type for relational queryIs there anyway to infer the type of a relational queries result? For example if I have a user who in drizzle.config.ts: "Cannot use import statement outside a module"happens when I try to `push`
```ts
import type { Config } from "drizzle-kit";
import { env } from "Error 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 interfa