Jay
Jay
Explore posts from servers
DTDrizzle Team
Created by Jay on 6/22/2024 in #help
Custom fields of db.query for many to many relationship for FE
No description
1 replies
PPrisma
Created by Jay on 6/13/2024 in #help-and-questions
prisma migrate dev deleted all my data and when I do another migrate dev again I got shadow error
This always happened
6 replies
DTDrizzle Team
Created by Jay on 6/12/2024 in #help
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:

import * as schema1 from './schema1';
import * as schema2 from './schema2';
import { drizzle } from 'drizzle-orm/...';
const db = drizzle(client, { schema: { ...schema1, ...schema2 } });
const result = await db.query.users.findMany({
with: {
posts: true
},
});

import * as schema1 from './schema1';
import * as schema2 from './schema2';
import { drizzle } from 'drizzle-orm/...';
const db = drizzle(client, { schema: { ...schema1, ...schema2 } });
const result = await db.query.users.findMany({
with: {
posts: true
},
});
According to docs. ^^^ I have drizzle. config.ts like this already :
typescript
export default defineConfig({
schema: './drizzle/schemas/*.ts',
out: './drizzle/migrations',
dialect: 'postgresql',
}
)
typescript
export default defineConfig({
schema: './drizzle/schemas/*.ts',
out: './drizzle/migrations',
dialect: 'postgresql',
}
)
Why cant I just do
const db = drizzle(client)
const db = drizzle(client)
(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?
2 replies
PPrisma
Created by Jay on 6/8/2024 in #help-and-questions
Problems regarding new feature (v5.15.0)
No description
8 replies
PPrisma
Created by Jay on 5/28/2024 in #help-and-questions
How to ignore custom migtation script without reset all data?
I cant create new migration without resetting the data if i do this
4 replies
PPrisma
Created by Jay on 5/21/2024 in #help-and-questions
Prisma Accelerate: ConnectorError. SUPABASE
[2024-05-21T05:34:31.404Z] GET http://localhost:3001/api/banners Error fetching Banners: Invalid prisma.banner.findMany() invocation: Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42P05", message: "prepared statement "s2" already exists", severity: "ERROR", detail: None, column: None, hint: None }), transient: false }) UNKNOWN
16 replies
PPrisma
Created by Jay on 4/26/2024 in #help-and-questions
Bun App. Cant fix Prisma Generate. Dockerfile?
This is the log error when I run ./server.js on Fly.io 2024-04-26T10:34:58.943 runner[e78464ea2742d8] sin [info] Machine started in 518ms 2024-04-26T10:34:59.024 app[e78464ea2742d8] sin [info] $ NODE_ENV=production bun ./server.js 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] 1031 | }; 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] 1032 | var version = "5.13.0"; 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] 1033 | var clientVersion = version; 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] 1034 | var PrismaClient = class { 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] 1035 | constructor() { 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] 1036 | throw new Error(@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report); 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] ^ 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] at new PrismaClient (/app/server.js:1036:13) 2024-04-26T10:34:59.301 app[e78464ea2742d8] sin [info] at /app/server.js:57670:14 2024-04-26T10:34:59.304 app[e78464ea2742d8] sin [info] error: script "start" exited with code 1
3 replies