Search code examples
databasepostgresqlprisma

How to generate a seed file based on existing data in postgresql via prisma orm?


I have parsed some data about restaurants and loaded them to my local database. How can I generate a seed file based on existing data in db via prisma orm?


Solution

  • make a seed.js

    connect to your local database, after retrieving you can bulk insert the data to any supported database which prisma supports.