Files
klz-cables.com/.pnpm-store/v10/files/83/fbc39d58acc575812dce8408ba921b29c1cfbd2bcbc60a89fc426b8434217a99f2396e6167d2d3ccf0c88e8e9453543fea34d1f13d96fe671eb2a1f2ccf6ea
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

38 lines
953 B
Plaintext

export const setColumnID = ({ adapter, columns, fields })=>{
const idField = fields.find((field)=>field.name === 'id');
if (idField) {
if (idField.type === 'number') {
columns.id = {
name: 'id',
type: 'numeric',
primaryKey: true
};
return 'numeric';
}
if (idField.type === 'text') {
columns.id = {
name: 'id',
type: 'varchar',
primaryKey: true
};
return 'varchar';
}
}
if (adapter.idType === 'uuid') {
columns.id = {
name: 'id',
type: 'uuid',
defaultRandom: true,
primaryKey: true
};
return 'uuid';
}
columns.id = {
name: 'id',
type: 'serial',
primaryKey: true
};
return 'integer';
};
//# sourceMappingURL=setColumnID.js.map