Is there a way to specify what file to ecto.migrate?

Hi so I am trying to run “mix ecto.migrate”, but I keep getting an error telling me the file its trying to migrate already has its relationship. The problem is that the file its trying to migrate is the wrong one, and I would like it to do another file. I am following along with the book if that helps at all. thanks in advance.


You did not mention which book You are refering to, I guess it must be Phoenix or Ecto book.

For better response, it’s good to put some code and in case it’s more complex, create a demo repo.

In case You want to reset your database, You can always use

mix ecto.drop
mix ecto.create
mix ecto.migrate

This should allow You to continue with a fresh db.

In case You have a wrong migration file, … just delete it?


Thanks, this helped! I will make sure to be more specific next time.