Skip to content

Instantly share code, notes, and snippets.

@fecony
fecony / README.md
Created January 7, 2022 23:29
Generate json data for Prisma countries, state and city seeding 🗄

// Countries, states, cities taken from https://github.com/dr5hn/countries-states-cities-database

// I had the idea of seeding the database with countries, states, and cities. // I tried to generate seed files with data from json files. I created data.json, copied in json of countries, and then used code.js file to parse data as I need.

// But after seeding, I realized that it didn't make sense. // And it's better to generate cities/countries/states as you go, as users add data for that particular location. // Cities SQL file takes 12,6 MB on disk // Just use SQL files...