Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drizzle-team/drizzle-prisma-generator
Generate Drizzle schema from Prisma schema
https://github.com/drizzle-team/drizzle-prisma-generator
database drizzle-orm mysql nodejs postgresql prisma sql sqlite typescript
Last synced: 7 days ago
JSON representation
Generate Drizzle schema from Prisma schema
- Host: GitHub
- URL: https://github.com/drizzle-team/drizzle-prisma-generator
- Owner: drizzle-team
- License: apache-2.0
- Created: 2024-05-15T10:23:15.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-13T15:19:49.000Z (3 months ago)
- Last Synced: 2024-10-24T03:35:48.105Z (23 days ago)
- Topics: database, drizzle-orm, mysql, nodejs, postgresql, prisma, sql, sqlite, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/drizzle-prisma-generator
- Size: 69.3 KB
- Stars: 12
- Watchers: 1
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Drizzle Prisma Generator
Automatically generate Drizzle schema from Prisma schema
## Usage
- Install generator: `pnpm add -D drizzle-prisma-generator`
- Add generator to prisma:
```Prisma
generator drizzle {
provider = "drizzle-prisma-generator"
output = "./src/schema.ts"
}
```
:warning: - if output doesn't end with `.ts`, it will be treated like a folder, and schema will be generated to `schema.ts` inside of it.
:warning: - binary types in `MySQL`, `PostgreSQL` are not yet supported by `drizzle-orm`, therefore will throw an error.
:warning: - generator only supports `postgresql`, `mysql`, `sqlite` data providers, others will throw an error.- Install `drizzle-orm`: `pnpm add drizzle-orm`
- Import schema from specified output file\folder
- Congratulations, now you can use Drizzle ORM with generated schemas!