Converts Firestore data file to a Prisma schema
- Make sure to have the Firestore JSON file ready. You could use something like node-firestore-import-export
- Don't forget to star this repo 😉
npx firestore-prisma --firestoreDataPath firestore.json
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
-
firestoreDataPath
: string - Firestore data file path- alias:
f
- required
- alias:
-
jsonSchemaPath
: string - Json schema output file path- alias:
j
- optional
- default:
schema.json
- alias:
-
prismaSchemaPath
: string - Prisma schema output file path- alias:
p
- optional
- default:
schema.prisma
- alias: