Skip to content

omar-dulaimi/firestore-prisma

Repository files navigation

Firestore Prisma

npm version npm HitCount npm

Converts Firestore data file to a Prisma schema

Buy Me A Coffee

Table of Contents

Prerequisites

Usage

  • Don't forget to star this repo 😉

With npx

npx firestore-prisma --firestoreDataPath firestore.json

With npm

1- Install the library

  • npm
 npm install -g firestore-prisma

or

  • yarn
 yarn global add firestore-prisma

2- Execute command

firestore-prisma -f firestore.json -j schema.prisma

Available Options

  • firestoreDataPath: string - Firestore data file path

    • alias: f
    • required
  • jsonSchemaPath: string - Json schema output file path

    • alias: j
    • optional
    • default: schema.json
  • prismaSchemaPath: string - Prisma schema output file path

    • alias: p
    • optional
    • default: schema.prisma