Rails - Where to store a sql file with data that goes into the DB
-
21-06-2021 - |
Pregunta
I have used the seed file to generate data that needs to go into the DB, but now I need to generate some countries, provinces and cities into three different tables and I haven't been able to find a good way to put that into the seed.
However I have found a sql file that has all that information and that I should dump into the DB. My question is:
Where should I store that in my Rails folder as a convention?
Thanks
Solución
I would create a directory at db/seeds, and place that seed file, and any others you may have in there.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow