I've setup my migration files and my seeder files with fake data and they're working nicely. I'm about to commit my work but don't really know what to do with my seeder files. I definitely don't want to run seeder files in production, so I thought I would ignore them. I wouldn't want to accidently migrate and seed fake data into production!
Yet, I'm thinking seeders can be used in production with real data. Say I add a new column that must perform some calculation on the other table columns (for the sake of the example let us ignore that any field that can be calculated from other fields shouldn't exist in the database) and store a value. Or a new setting/flag. I think I could create a seeder to populate that field with the already existing production data. So now I can't ignore the seeder directory.
Should I decide on ignoring each file independently for every case? Can I declare somewhere that the seeder should only run in dev
environment? What is the convention here?