Last 12 weeks · 0 commits
2 of 6 standards met
Before submitting other fixes/improvements to this package, I thought it was best to get the baseline covered by tests. I've added a dir that has a spec for each generator and the utils. I've opted for small tests, leaning into inline snapshots, and having each test output the results to a typescript file. After the tests have run it runs that verifies the generated results compile.
This pull request introduces a small but important update to the function in . The change ensures that negative numeric default values for certain field types are correctly handled by converting them to strings before assigning them as defaults. Default Value Handling: Updated the logic for assigning default values to fields of type , , and so that if the default value is a negative number, it is converted to a string before being set as the default. This prevents potential issues with negative numeric defaults in these field types. Example:
🚀 Feature: Support for Drizzle's new functionality This PR adds support for Drizzle ORM v0.30.5's new functionality by mapping Prisma's attribute to Drizzle's . 📋 Changes PostgreSQL Generator: Maps to MySQL Generator: Maps to SQLite Generator: Maps to 🎯 Implementation Details Follows established codebase patterns for field modifier handling Consistent implementation across all three database generators Uses Prisma's native DMMF property Zero breaking changes to existing functionality Minimal code changes (3 lines per generator) 📖 Usage Prisma Schema: Generated Drizzle Schema:** 🔗 Related Drizzle ORM v0.30.5 release: https://orm.drizzle.team/docs/latest-releases/drizzle-orm-v0305 Drizzle documentation: https://orm.drizzle.team/docs/column-types/pg ✅ Testing All existing tests pass Build completes successfully Follows TypeScript strict mode requirements This enhancement provides seamless integration between Prisma's attribute and Drizzle's new functionality, enabling automatic timestamp updates when records are modified.
Repository: drizzle-team/drizzle-prisma-generator. Description: Generate Drizzle schema from Prisma schema Stars: 35, Forks: 16. Primary language: TypeScript. Languages: TypeScript (95.2%), JavaScript (4.8%). License: Apache-2.0. Homepage: https://www.npmjs.com/package/drizzle-prisma-generator Topics: database, drizzle-orm, mysql, nodejs, postgresql, prisma, sql, sqlite, typescript. Latest release: 0.1.7 (2y ago). Open PRs: 12, open issues: 5. Last activity: 2y ago. Community health: 37%. Top contributors: Sukairo-02.