From 060160f54afefc29a4b2b74eff4f0927ae91d1df Mon Sep 17 00:00:00 2001 From: Simon Planinschek Date: Tue, 26 May 2026 11:32:48 +0200 Subject: [PATCH] patch out auto schema creation in drizzle --- bun.lock | 3 +++ package.json | 3 +++ patches/drizzle-orm@0.45.2.patch | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 patches/drizzle-orm@0.45.2.patch diff --git a/bun.lock b/bun.lock index a61b3b8..5199c30 100644 --- a/bun.lock +++ b/bun.lock @@ -22,6 +22,9 @@ }, }, }, + "patchedDependencies": { + "drizzle-orm@0.45.2": "patches/drizzle-orm@0.45.2.patch", + }, "packages": { "@aboutbits/eslint-config": ["@aboutbits/eslint-config@5.1.0", "https://npm.pkg.github.com/download/@aboutbits/eslint-config/5.1.0/d52d80ee2b18033481e8644deee62386bf3e7e00", { "dependencies": { "@eslint/eslintrc": "^3.3.4", "@eslint/js": "^9.39.3", "@eslint/json": "^1.0.1", "@typescript-eslint/eslint-plugin": "^8.56.1", "@typescript-eslint/parser": "^8.56.1", "eslint-config-prettier": "^10.1.8", "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-better-tailwindcss": "^4.3.0", "eslint-plugin-formatjs": "^6.2.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jest": "^29.15.0", "eslint-plugin-jsonc": "^3.1.0", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-mdx": "^3.6.2", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^6.1.1", "eslint-plugin-sort-keys": "^2.3.5", "eslint-plugin-unused-imports": "^4.4.1", "globals": "^17.3.0", "typescript-eslint": "^8.56.1" }, "peerDependencies": { "@next/eslint-plugin-next": "^14 || ^15 || ^16", "eslint": "^9", "eslint-plugin-storybook": "^10", "prettier": "^3", "typescript": "^4.9 || ^5" } }, "sha512-oEDFqfbktb5nXdi3GbX1esQnzdzsY0B2THvp+X7Dn45ZdUAtHe5X+/2bXPU/ZngLn/M8GpkCfHY6DwV4jDQ10Q=="], diff --git a/package.json b/package.json index da8316b..84f94f4 100644 --- a/package.json +++ b/package.json @@ -29,5 +29,8 @@ "dependencies": { "@slack/bolt": "^4.7.2", "drizzle-orm": "^0.45.2" + }, + "patchedDependencies": { + "drizzle-orm@0.45.2": "patches/drizzle-orm@0.45.2.patch" } } diff --git a/patches/drizzle-orm@0.45.2.patch b/patches/drizzle-orm@0.45.2.patch new file mode 100644 index 0000000..51e8201 --- /dev/null +++ b/patches/drizzle-orm@0.45.2.patch @@ -0,0 +1,13 @@ +diff --git a/pg-core/dialect.cjs b/pg-core/dialect.cjs +index b2c2a77086503f751985bc6928d398c62cf79762..e3797057a3c1482063b534fdda1542f1dc9ad358 100644 +--- a/pg-core/dialect.cjs ++++ b/pg-core/dialect.cjs +@@ -53,7 +53,7 @@ class PgDialect { + created_at bigint + ) + `; +- await session.execute(import_sql2.sql`CREATE SCHEMA IF NOT EXISTS ${import_sql2.sql.identifier(migrationsSchema)}`); ++ //await session.execute(import_sql2.sql`CREATE SCHEMA IF NOT EXISTS ${import_sql2.sql.identifier(migrationsSchema)}`); + 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`