hk
hk
Explore posts from servers
DTDrizzle Team
Created by joshborseth on 9/14/2023 in #help
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
solution if the table name is too long then you need to set a primaryKey custom name
pk: primaryKey({
columns: [table.colm1, table.colm2],
name: 'custom_tabke_pkey',
})
pk: primaryKey({
columns: [table.colm1, table.colm2],
name: 'custom_tabke_pkey',
})
44 replies
DTDrizzle Team
Created by joshborseth on 9/14/2023 in #help
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
I upgraded to 0.21.4 and still have the same error, when running push on an empty database it works for the first time but after that I keep getting Cannot read properties of undefined (reading 'compositePrimaryKeys') Here is my pgtable
export const table1 = pgTable(
'table1',
{
colm1: varchar('colm1', { length: 255 })
.notNull()
.references(() => ref1.id),
colm2: varchar('colm2', { length: 255 })
.notNull()
.references(() => ref2.id),
},
(table) => {
return {
pk: primaryKey({
columns: [table.colm1, table.colm2],
}),
};
},
);
export const table1 = pgTable(
'table1',
{
colm1: varchar('colm1', { length: 255 })
.notNull()
.references(() => ref1.id),
colm2: varchar('colm2', { length: 255 })
.notNull()
.references(() => ref2.id),
},
(table) => {
return {
pk: primaryKey({
columns: [table.colm1, table.colm2],
}),
};
},
);
44 replies
DTDrizzle Team
Created by hk on 5/15/2024 in #help
Cannot read properties of undefined (reading 'compositePrimaryKeys')
just the kit to 0.20.18 and if you want to use drizzle studio run studio--port 4983
7 replies
DTDrizzle Team
Created by hk on 5/15/2024 in #help
Cannot read properties of undefined (reading 'compositePrimaryKeys')
@terlan8892 downgraded for now until we get an update from drizzle 😅
7 replies
DTDrizzle Team
Created by hk on 5/15/2024 in #help
Cannot read properties of undefined (reading 'compositePrimaryKeys')
anything I can do about it? thanks
7 replies
DTDrizzle Team
Created by hk on 5/15/2024 in #help
Cannot read properties of undefined (reading 'compositePrimaryKeys')
I got this error only after upgrading to [email protected] and 0.21.2
7 replies
DTDrizzle Team
Created by hk on 5/15/2024 in #help
Cannot read properties of undefined (reading 'compositePrimaryKeys')
Error
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
at /node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19323:67
at Array.map (<anonymous>)
at prepareAddCompositePrimaryKeyPg (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19315:33)
at applyPgSnapshotsDiff (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19825:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async preparePgPush (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:22080:52)
at async pgPush (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:106652:26)
at async Command.<anonymous> (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:113633:7)
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
at /node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19323:67
at Array.map (<anonymous>)
at prepareAddCompositePrimaryKeyPg (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19315:33)
at applyPgSnapshotsDiff (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:19825:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async preparePgPush (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:22080:52)
at async pgPush (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:106652:26)
at async Command.<anonymous> (/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:113633:7)
7 replies
DTDrizzle Team
Created by hk on 4/19/2024 in #help
long nested relation is exceeding 63 characters for Postgres
this is another example of the issue on github https://github.com/drizzle-team/drizzle-orm/issues/1378
2 replies
DTDrizzle Team
Created by hk on 1/11/2024 in #help
increase or decrease values
yeah that make sense thanks!
7 replies
DTDrizzle Team
Created by hk on 1/11/2024 in #help
increase or decrease values
No description
7 replies
DTDrizzle Team
Created by hk on 1/11/2024 in #help
increase or decrease values
@solo is it possible to make the + like this?
const operator = isIncrease === true ? '+' : '-'
const operator = isIncrease === true ? '+' : '-'
7 replies
DTDrizzle Team
Created by hk on 1/11/2024 in #help
increase or decrease values
yeah exactly what I tried and seems to work
7 replies