From 3c4112939d0e93393d826aafafea6d15cf4e7c1b Mon Sep 17 00:00:00 2001 From: Simon Planinschek Date: Tue, 26 May 2026 11:51:11 +0200 Subject: [PATCH 1/2] copy patches/ into Docker deps stage so bun install applies the drizzle-orm patch --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 9738f40..a608d11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM oven/bun:alpine AS deps WORKDIR /app COPY package.json bun.lock ./ +COPY patches/ ./patches/ RUN bun install --frozen-lockfile --production FROM oven/bun:alpine AS runner From 3e52e7e5a839d65dc8461c6500e34f6a86ec4198 Mon Sep 17 00:00:00 2001 From: Simon Planinschek Date: Tue, 26 May 2026 12:04:54 +0200 Subject: [PATCH 2/2] extend patch --- patches/drizzle-orm@0.45.2.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patches/drizzle-orm@0.45.2.patch b/patches/drizzle-orm@0.45.2.patch index 51e8201..b77afee 100644 --- a/patches/drizzle-orm@0.45.2.patch +++ b/patches/drizzle-orm@0.45.2.patch @@ -11,3 +11,16 @@ index b2c2a77086503f751985bc6928d398c62cf79762..e3797057a3c1482063b534fdda1542f1 await session.execute(migrationTableCreate); const dbMigrations = await session.all( import_sql2.sql`select id, hash, created_at from ${import_sql2.sql.identifier(migrationsSchema)}.${import_sql2.sql.identifier(migrationsTable)} order by created_at desc limit 1` +diff --git a/pg-core/dialect.js b/pg-core/dialect.js +index 31a019cc0a6bc67303a745fdf9ad613e8fbdcb5f..0374dccd641bffe3ae77e22aad8d4bbf159a6f5d 100644 +--- a/pg-core/dialect.js ++++ b/pg-core/dialect.js +@@ -51,7 +51,7 @@ class PgDialect { + created_at bigint + ) + `; +- await session.execute(sql`CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}`); ++ //await session.execute(sql`CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}`); + await session.execute(migrationTableCreate); + const dbMigrations = await session.all( + sql`select id, hash, created_at from ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} order by created_at desc limit 1`