Cannot read properties of undefined (reading 'compositePrimaryKeys')

My table
export const tableName = pgTable(
    'table_name',
    {
      t1Id: varchar('t1_id', { length: 255 })
        .notNull()
        .references(() => t1.id),
      t2Id: varchar('t2_id', { length: 255 })
        .notNull()
        .references(() => t2.id),
      ...defaults,
    },
    (table) => {
      return {
        pk: primaryKey({
          columns: [table.t1Id, table.t2Id],
        }),
      };
    },
  );
Was this page helpful?