Anthony M.
Anthony M.
DTDrizzle Team
Created by Anthony M. on 12/12/2024 in #help
Problem with ENUMs PostgreSQL
also just so if you're going to say I should do something like suggestionStatusEnum('status') instead of suggestionStatusEnum() I did that before what I sent, same result.
4 replies
DTDrizzle Team
Created by Anthony M. on 12/12/2024 in #help
Problem with ENUMs PostgreSQL
full error:
Using 'pg' driver for database querying
[⣻] applying migrations...error: type "activity_log_activity_enum" already exists
at C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\pg@8.13.1\node_modules\pg\lib\client.js:535:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at <anonymous> (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\pg-core\dialect.ts:102:7)
at NodePgSession.transaction (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\node-postgres\session.ts:193:19)
at PgDialect.migrate (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\pg-core\dialect.ts:95:3)
at migrate (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\node-postgres\migrator.ts:10:2) {
length: 106,
severity: 'ERROR',
code: '42710',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'typecmds.c',
line: '1167',
routine: 'DefineEnum'
}
 ELIFECYCLE  Command failed with exit code 1.
Using 'pg' driver for database querying
[⣻] applying migrations...error: type "activity_log_activity_enum" already exists
at C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\pg@8.13.1\node_modules\pg\lib\client.js:535:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at <anonymous> (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\pg-core\dialect.ts:102:7)
at NodePgSession.transaction (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\node-postgres\session.ts:193:19)
at PgDialect.migrate (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\pg-core\dialect.ts:95:3)
at migrate (C:\Users\Anthony\VSCodeProjects\BerryBot\node_modules\.pnpm\drizzle-orm@0.38.1_@types+pg@8.11.10_mysql2@3.11.4_pg@8.13.1\node_modules\src\node-postgres\migrator.ts:10:2) {
length: 106,
severity: 'ERROR',
code: '42710',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'typecmds.c',
line: '1167',
routine: 'DefineEnum'
}
 ELIFECYCLE  Command failed with exit code 1.
4 replies
DTDrizzle Team
Created by Anthony M. on 12/12/2024 in #help
Problem with ENUMs PostgreSQL
drizzle kit generated SQL: https://pastes.dev/HurdWu84Lc my schema: https://pastes.dev/uUE0RRPnV3
4 replies
DTDrizzle Team
Created by Anthony M. on 11/21/2024 in #help
MySQL support
unrelated to enum, it was serial that was causing the issue, I fixed it by simply modifying the sql before migrating from serial to bigint UNSIGNED
6 replies
DTDrizzle Team
Created by Anthony M. on 11/21/2024 in #help
MySQL support
6 replies