benjick
benjick
Explore posts from servers
DTDrizzle Team
Created by benjick on 1/24/2025 in #help
error: relation "xxx" already exists
bump
4 replies
DTDrizzle Team
Created by benjick on 1/24/2025 in #help
error: relation "xxx" already exists
> dotenv drizzle-kit push

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/me/my-app/apps/nextjs/drizzle.config.ts'
(node:34627) ExperimentalWarning: CommonJS module /Users/me/my-app/apps/nextjs/drizzle.config.ts is loading ES Module /Users/me/my-app/apps/nextjs/src/env.mjs using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Using 'pg' driver for database querying
[✓] Pulling schema from database...
error: relation "table_filters" already exists
at /Users/me/my-app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.query (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:64475:26)
at async pgPush (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:67954:13)
at async Object.handler (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:76964:9)
at async run (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:76221:7) {
length: 107,
severity: 'ERROR',
code: '42P07',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'heap.c',
line: '1149',
routine: 'heap_create_with_catalog'
}
> dotenv drizzle-kit push

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/me/my-app/apps/nextjs/drizzle.config.ts'
(node:34627) ExperimentalWarning: CommonJS module /Users/me/my-app/apps/nextjs/drizzle.config.ts is loading ES Module /Users/me/my-app/apps/nextjs/src/env.mjs using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Using 'pg' driver for database querying
[✓] Pulling schema from database...
error: relation "table_filters" already exists
at /Users/me/my-app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.query (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:64475:26)
at async pgPush (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:67954:13)
at async Object.handler (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:76964:9)
at async run (/Users/me/my-app/apps/nextjs/node_modules/drizzle-kit/bin.cjs:76221:7) {
length: 107,
severity: 'ERROR',
code: '42P07',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'heap.c',
line: '1149',
routine: 'heap_create_with_catalog'
}
4 replies
DTDrizzle Team
Created by benjick on 1/24/2025 in #help
error: relation "xxx" already exists
Here are the full logs after I've wiped the database:
> dotenv drizzle-kit push

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/me/my-app/apps/nextjs/drizzle.config.ts'
(node:34566) ExperimentalWarning: CommonJS module /Users/me/my-app/apps/nextjs/drizzle.config.ts is loading ES Module /Users/me/my-app/apps/nextjs/src/env.mjs using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Using 'pg' driver for database querying
[✓] Pulling schema from database...
[✓] Changes applied
> dotenv drizzle-kit push

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/me/my-app/apps/nextjs/drizzle.config.ts'
(node:34566) ExperimentalWarning: CommonJS module /Users/me/my-app/apps/nextjs/drizzle.config.ts is loading ES Module /Users/me/my-app/apps/nextjs/src/env.mjs using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Using 'pg' driver for database querying
[✓] Pulling schema from database...
[✓] Changes applied
4 replies
DTDrizzle Team
Created by Cyber Grandma on 9/26/2024 in #help
Possible to have multiple onConflict ?
Too bad! Thanks for letting me know!
6 replies
DTDrizzle Team
Created by Cyber Grandma on 9/26/2024 in #help
Possible to have multiple onConflict ?
Was it?
6 replies
DTDrizzle Team
Created by benjick on 9/24/2024 in #help
drizzle-kit picks wrong version in monorepo (pnpm)
I had to use node-linker=hoisted in .npmrc
5 replies
DTDrizzle Team
Created by benjick on 9/24/2024 in #help
drizzle-kit picks wrong version in monorepo (pnpm)
bump
5 replies
DTDrizzle Team
Created by benjick on 9/24/2024 in #help
drizzle-kit picks wrong version in monorepo (pnpm)
drizzle-kit: v0.22.0
drizzle-orm: v0.29.3

This version of drizzle-kit requires newer version of drizzle-orm
drizzle-kit: v0.22.0
drizzle-orm: v0.29.3

This version of drizzle-kit requires newer version of drizzle-orm
cat package.json | grep drizzle
"drizzle-kit": "^0.22.0",
"drizzle-orm": "0.31.4",
"drizzle-zod": "^0.5.1",
cat package.json | grep drizzle
"drizzle-kit": "^0.22.0",
"drizzle-orm": "0.31.4",
"drizzle-zod": "^0.5.1",
5 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
Big thanks for the help!
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
Fixed the data up and generated new migrations
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
I had duplicate ids in the table
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
Thanks!
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
I wonder if it can't apply the constrains
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
Yes, it is
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
Thanks a lot
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
I understand, I will think of something. I do appreciate finding on the reason for this
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
Ah okay, maybe a custom one will be fine
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
It did not have the index. So should I remove it from the code, generate migrations, add it back?
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
I'm gonna create a new local db and run migrations on it and see if it gets the index
48 replies
DTDrizzle Team
Created by benjick on 7/22/2024 in #help
there is no unique or exclusion constraint matching the ON CONFLICT specification
I see, and now I've upgraded and that's why it works locally, because I use db:push
48 replies