Files
klz-cables.com/.pnpm-store/v10/files/f4/dda1b4971bd6465b68451383873f0a5ca798eaca78527b80932f252ebdaa86e265aa6728635889027902748b92e3129258334ea8f9d6a66a9f7be2e99b15d5
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

39 lines
994 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: 'text',
primaryKey: true
};
return 'text';
}
}
if (adapter.idType === 'uuid') {
columns.id = {
name: 'id',
type: 'uuid',
defaultRandom: true,
primaryKey: true
};
return 'uuid';
}
columns.id = {
name: 'id',
type: 'integer',
autoIncrement: adapter.autoIncrement,
primaryKey: true
};
return 'integer';
};
//# sourceMappingURL=setColumnID.js.map