Does anyone add logic to their `prisma/seed.ts` fi...
# orm-help
c
Does anyone add logic to their
prisma/seed.ts
file to seed their development database with dummy data to help with coding, that doesn't get seeded in production? I'm thinking I'd like to do that by checking
if (process.env.NODE_ENV === 'development')
for certain things in my seed file, am I crazy or is this an O.K. idea?
Also thinking of doing the same for our staging environment.
s
I was looking at this yesterday - I don’t think the seeding gets called in production because you use deploy function (the documents don’t mention seeding when in production). Personally I want some seeding to happen for basic data that should exist in every env. Did you get far with this?
c
Haven't deployed to production yet, but there is certainly data that needs to be seeded in production so I'll be curious to see if that works.
r
@Chris Tsongas 👋 Yes this will work. The function/code will only be called if the env matches.