0

I wanted to update my existing data that are added through seeds (like change permissions,etc.) on the production server. I've created migration for changing the data as per the requirement.

I've also written unit tests for my code that are configured to run automatically through bitbucket pipelines when I am pushing anything on my repository.

So the problem is when tests are running it runs migration first then running the seeds. But when migration is running my tests are getting failed cause of altering existing data because seeds didn't run at that time and data is missing.

Kapil Verma
  • 178
  • 3
  • 17
  • AFAIK, seeds are only made for testing purposes, so trying to use seeds on production, you're already on the wrong way. You may put the data you want to change/update inside a migration. – adrian7 Dec 28 '17 at 14:39
  • That are the basic values and ran only once on the production server. Issue is when code is pushed on bitbucket server automatically tests are running. That tests getting failed. – Kapil Verma Dec 29 '17 at 09:36

0 Answers0