DT
Drizzle TeamHussein
"Seems like the schema generic is missing - did you forget to add it to your DB type?"
how to fix this... i need to use db.query
A
Angelelz•191d ago
Drizzle Queries - DrizzleORM
Drizzle ORM | %s
H
Hussein•191d ago
?
do i need to pass {schema} to drizzle()?
its giving me this huge error
this is my schema
A
Angelelz•190d ago
How are you defining the drizzle object?
H
Hussein•190d ago
i changed this schema according to https://discord.com/channels/1043890932593987624/1111572543556550738/1148828114345021510
so now its
A
Angelelz•190d ago
Try this:
H
Hussein•190d ago
thanks
can you help me with this schema
K
Kilisei•174d ago
@Angelelz you saved my sanity
Your a chad
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.2KMembers
View on DiscordWant results from more Discord servers?
More Postsmigrate function hangs without any resultI have this in my `migrate.js` file
```
// @ts-check
const { drizzle } = require("drizzle-orm/nodeSelect with a join that returns eagerly loaded submodelshey all, is it possible to do a select on a model using a join and return the model with eagerly loarole 'postgres' does not existHi, Trying to run db:push with a postgres db, gettign this error:
```No config path provided, usingHow would I get 2 unique values?I got my post likes table.
```ts
export const postLike = sqliteTable(
"post_like",
{
postId:Infinite scroll w/ Drizzle + tRPCHas anyone implemented infinite scrolling/pagination using Drizzle? The example in the tRPC docs useHRANA_WEBSOCKET_ERROR: Unexpected server response: 404```ts
// ./drizzle.config.ts
import type { Config } from "drizzle-kit";
export default {
schema: URL_INVALIDThe env variables are defined when using `bun run push` but not when using `npm run push` or `pnpm rCustom Logging: hide notice messages ?Hi, I'm using Drizzle ORM with Postgres SQL.
Every time I start my project, it does a migration andSpecifying single schema to pushHello:
I'm hoping to push a single schema to the database after dropping the table. This way I can`sql.join` with `ODER BY` leads to syntax error while the sql query seems correct.I am conditionally sorting the results from a database query
```ts
const sortSqlChunks: SQL[] = [];
How to run migration script?I am looking into this doc (https://orm.drizzle.team/kit-docs/overview#running-migrations) regardingCannot get id field in the next-auth session.I am currently working on the drizzle nextjs project. I am using neondb postgresql as database.
I amHow to express "children" or "parent" relation with typescript?Let's say I have a `country` and `region` tables. A region belongs to a country, so on the `region`t'token' used in key specification without a key lengthApparently I need to use
`token: varchar("token", { length: 255 })` because `token: text("token")`ER_TABLE_EXISTS_ERRORCan someone explain me what is the proper workflow?
1. change schema.ts (add another column to tablcolumn "summary" cannot be cast automatically to type jsonbHello!
I'm getting this error when running my migrations, I used to have a text field and now it's how to use in denoim trying to use it in deno but there are errorsPostgres timestamp that will be the same across regionsHello everyone,
So I have a statement like the following:
```sql
CREATE TABLE your_table_name (
is there a way to wrap a column select with ST_AsText or any other sql statement?I've created a custom column type but the column return by default a binary data, instead i want to inferring the column information from the imported schemais there anyway to get the column information from the imported schema information. When I dump the