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?
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
© 2022 - 2024 — McMap. All rights reserved.
$UMBRELLA/apps/foo
) and you should be able to run it there. – Breeching