Last 12 weeks ยท 2 commits
4 of 6 standards met
Sharing for posterity as it may help someone. A to switch databases to in-memory , push your drizzle schema, and insert seed data. runs-WASM compiled postgres in memory, which is ideal for testing as there's no docker containers, no delay, and it's real pg. This solution supports parallelism and watch mode. Most importantly - it uses push in place of migrate, as there's no need to create migration files when testing. Note to Drizzle maintainers, please do not remove 's method. While it's not well documented, it allows us to push schema directly to test dbs. Please don't make me push via child_process execSync again. Stack: Typescript Vitest Drizzle NodePostgres () Mock: Detail:**
Repository: drizzle-team/drizzle-orm. Description: ORM Stars: 33069, Forks: 1223. Primary language: TypeScript. Languages: TypeScript (98.7%), JavaScript (1.3%). License: Apache-2.0. Homepage: https://orm.drizzle.team Topics: bunjs, mysql, nodejs, orm, postgres, postgresql, sql, sqlite, turso, typescript. Latest release: drizzle-kit@0.31.9 (3w ago). Open PRs: 100, open issues: 1485. Last activity: 1d ago. Community health: 87%. Top contributors: AndriiSherman, dankochetov, L-Mario564, AlexBlokh, Sukairo-02, Angelelz, AleksandrSherman, OleksiiKH0240, RomanNabukhotnyi, realmikesolo and others.
TypeScript
Feature hasn't been suggested before. [x] I have verified this feature I'm about to request hasn't been suggested before. Describe the enhancement you want to request Issue from the discussion https://github.com/drizzle-team/drizzle-orm/discussions/3677 I would like to start thinking about DSQL support by: Gathering all the pains and bugs people have trying to use Drizzle with DSQL Sharing the workaround and ways to use current Drizzle with DSQL Then discussing what should be done to fully support DSQL And finally implementing it ๐ (probably after v1 release)
Report hasn't been filed before. [x] I have verified that the bug I'm about to report hasn't been filed before. What version of are you using? 0.45.1 What version of are you using? 0.31.8 Other packages _No response_ Describe the Bug Iโm trying to use the Node-Postgres migrator in Drizzle ORM (v0.45.1) for a codebase-first migration workflow (TypeScript schema โ SQL โ runtime apply). I followed the docs, but Iโm running into TypeScript and runtime import issues with migrate and zmigrate. What I tried Using the docs code (migrate) Docs suggest: Error observed: _TS2724: '"drizzle-orm/node-postgres/migrator"' has no exported member named 'migrate'. Did you mean 'zmigrate'_? Switching to zmigrate Issues observed at runtime with tsx: _TypeError: (0 , import_migrator.zmigrate) is not a function_ Environment _Node.js v20.20.0_ _TypeScript v5.1.3_ _Drizzle ORM v0.45.1_ _Drizzle Kit v0.31.8_ _pg v8.17.2_ _tsx v4.21.0_ Suggested guidance needed** _Correct import pattern for Node-Postgres migrator that works in TS + tsx runtime_ _Update docs if migrate() is outdated_