From f37659de5f44cdd04c90d4f37651fe0cf7ad5bb3 Mon Sep 17 00:00:00 2001 From: Sasha <64744993+r1tsuu@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:36:56 +0200 Subject: [PATCH] fix(db-postgres): prevent indexes from changing name on HMR --- packages/drizzle/src/schema/buildRawSchema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/drizzle/src/schema/buildRawSchema.ts b/packages/drizzle/src/schema/buildRawSchema.ts index 6c6f0cf3510..701d5052118 100644 --- a/packages/drizzle/src/schema/buildRawSchema.ts +++ b/packages/drizzle/src/schema/buildRawSchema.ts @@ -16,6 +16,8 @@ export const buildRawSchema = ({ adapter: DrizzleAdapter setColumnID: SetColumnID }) => { + adapter.indexes = new Set() + adapter.payload.config.collections.forEach((collection) => { createTableName({ adapter,