Files
klz-cables.com/.pnpm-store/v10/files/1f/af6b51a82b06b880fb6a52a73785993de223ee1b16a05b412de5b03ab859962fed15687d3fbdb39aede4a0e8b94556709b52deba4b6c547cbfe77ca74e01de
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

19 lines
692 B
Plaintext

const getTables = (adapter)=>{
return adapter.client.execute(`SELECT name
FROM sqlite_master
WHERE type = 'table'
AND name NOT LIKE 'sqlite_%';`);
};
const dropTables = (adapter, rows)=>{
const multi = `
PRAGMA foreign_keys = OFF;\n
${rows.map(({ name })=>`DROP TABLE IF EXISTS ${name}`).join(';\n ')};\n
PRAGMA foreign_keys = ON;`;
return adapter.client.executeMultiple(multi);
};
export const dropDatabase = async function({ adapter }) {
const result = await getTables(adapter);
await dropTables(adapter, result.rows);
};
//# sourceMappingURL=dropDatabase.js.map