Vonyc
Explore posts from serversDTDrizzle Team
•Created by Vonyc on 7/23/2023 in #help
Error when calling drizzle-kit push:pg again
When I call the command for the first time, everything is fine, everything is entered into the database, but if I call it the 2nd time. The following error appears:
drizzle-kit: v0.19.9
drizzle-orm: v0.27.2
No config path provided, using default 'drizzle.config.ts'
Reading config file '.../drizzle.config.ts'
.../node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40646
const message = name === "notice" ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
^
error: relation "public.verificationtoken" does not exist
at Parser.parseErrorMessage (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40646:98)
at Parser.handlePacket (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40487:25)
at Parser.parse (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40411:34)
at TLSSocket.<anonymous> (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40687:44)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 128,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '1230',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'namespace.c',
line: '428',
routine: 'RangeVarGetRelidExtended'
}
drizzle-kit: v0.19.9
drizzle-orm: v0.27.2
No config path provided, using default 'drizzle.config.ts'
Reading config file '.../drizzle.config.ts'
.../node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40646
const message = name === "notice" ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
^
error: relation "public.verificationtoken" does not exist
at Parser.parseErrorMessage (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40646:98)
at Parser.handlePacket (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40487:25)
at Parser.parse (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40411:34)
at TLSSocket.<anonymous> (...node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/index.cjs:40687:44)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 128,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '1230',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'namespace.c',
line: '428',
routine: 'RangeVarGetRelidExtended'
}
5 replies
DTDrizzle Team
•Created by Vonyc on 6/16/2023 in #help
How to check if is not null
Hello,
i want to find all users where name is not null. How to do in this situation?
await db.query.users.findFirst({where: (users, { eq }) => eq(users.name, 'test')});
await db.query.users.findFirst({where: (users, { eq }) => eq(users.name, 'test')});
4 replies