I'm trying to create a migration using the command mix ecto.gen.migration <migration_name>
and I'm getting the error:
Cannot run task "ecto.gen.migration" from umbrella application
Why I'm getting this error?
For umbrella apps you need to explicitly run the migrations inside the application where the repo lives. This is because in umbrella applications, you can have multiple applications, all with multiple repos, so the generator would not know which application to run it for, so you have to run it within that application.
cd apps/my_app_name && mix ecto.gen.migration create_users
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With