Any tips on how to prevent seeding duplicate data ...
# orm-help
a
Any tips on how to prevent seeding duplicate data on docker-compose ?
n
Don't run the command on startup
a
Lol was hoping for something else XD
Thanks though
n
You could also reset and seed on startup
a
Issue there is that I don’t want to reset persisted data if I kill local container. What I really need is a conditional check. seededDataExists() ? echo ‘moving on’ : prisma seed; Originally thinking I could implement a check in node or bash, but issue there is that if seeded data changes, then the data check needs to change. Not a deal breaker — just not very clean.
I think cleaner version would be to implement snapshotting on seed.graphql and then use that as basis of comparison. Just more work than I want to do for cleanup tbh