Skip to content

Commit 5ba4120

Browse files
authored
fix: copy patches/ before bun install in Dockerfile (#4)
* copy patches/ into Docker deps stage so bun install applies the drizzle-orm patch * extend patch
1 parent aa6f139 commit 5ba4120

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM oven/bun:alpine AS deps
22
WORKDIR /app
33
COPY package.json bun.lock ./
4+
COPY patches/ ./patches/
45
RUN bun install --frozen-lockfile --production
56

67
FROM oven/bun:alpine AS runner

patches/drizzle-orm@0.45.2.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,16 @@ index b2c2a77086503f751985bc6928d398c62cf79762..e3797057a3c1482063b534fdda1542f1
1111
await session.execute(migrationTableCreate);
1212
const dbMigrations = await session.all(
1313
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`
14+
diff --git a/pg-core/dialect.js b/pg-core/dialect.js
15+
index 31a019cc0a6bc67303a745fdf9ad613e8fbdcb5f..0374dccd641bffe3ae77e22aad8d4bbf159a6f5d 100644
16+
--- a/pg-core/dialect.js
17+
+++ b/pg-core/dialect.js
18+
@@ -51,7 +51,7 @@ class PgDialect {
19+
created_at bigint
20+
)
21+
`;
22+
- await session.execute(sql`CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}`);
23+
+ //await session.execute(sql`CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}`);
24+
await session.execute(migrationTableCreate);
25+
const dbMigrations = await session.all(
26+
sql`select id, hash, created_at from ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} order by created_at desc limit 1`

0 commit comments

Comments
 (0)