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

41 lines
1.2 KiB
Plaintext

import { buildDrizzleRelations } from '../schema/buildDrizzleRelations.js';
import { buildRawSchema } from '../schema/buildRawSchema.js';
import { executeSchemaHooks } from '../utilities/executeSchemaHooks.js';
import { buildDrizzleTable } from './schema/buildDrizzleTable.js';
import { setColumnID } from './schema/setColumnID.js';
export const init = async function init() {
this.rawRelations = {};
this.rawTables = {};
buildRawSchema({
adapter: this,
setColumnID
});
await executeSchemaHooks({
type: 'beforeSchemaInit',
adapter: this
});
if (this.payload.config.localization) {
this.enums.enum__locales = this.pgSchema.enum('_locales', this.payload.config.localization.locales.map(({ code })=>code));
}
for(const tableName in this.rawTables){
buildDrizzleTable({
adapter: this,
rawTable: this.rawTables[tableName]
});
}
buildDrizzleRelations({
adapter: this
});
await executeSchemaHooks({
type: 'afterSchemaInit',
adapter: this
});
this.schema = {
pgSchema: this.pgSchema,
...this.tables,
...this.relations,
...this.enums
};
};
//# sourceMappingURL=init.js.map