GitShow/drizzle-team/drizzle-prisma-generator
drizzle-team

drizzle-prisma-generator

Generate Drizzle schema from Prisma schema

by drizzle-team
databasedrizzle-ormmysqlnodejspostgresqlprismasqlsqlite
Star on GitHubForkWebsitenpm

TypeScript

35 stars16 forks1 contributorQuiet · 2y agoSince 20240.1.7Apache-2.0

Meet the team

See all 1 on GitHub →
Sukairo-02
Sukairo-0215 contributions

Languages

View on GitHub →
TypeScript95.2%
JavaScript4.8%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
37
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 2y ago
See all on GitHub →
jackall3n
chore: add tests with vitestOpenPR

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.

jackall3n · 3w ago
ryanzen9
Fix the issue where running `npx prisma generate` generates incorrect file types when the default value is negative.OpenPR

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:

ryanzen9 · 3mo ago
pasha-vuiko
Add support of native type mappings from Prisma schemaOpenPR
pasha-vuiko · 9mo ago

Recent fixes

View closed PRs →
Balance8
feat: add support for Drizzle's $onUpdate functionality with @updatedAtMergedPR

🚀 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.

Balance8 · 2mo ago
Structured data for AI agents

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.

·@ofershap

Replace github.com with gitshow.dev