I tried doing the same on my MacBook and it just works fine. There are no duplicate migrations in code. Its not working on ubuntu machine. I am building the release in a docker image.
PS - The local version of Postgres on Macbook is 11.5, while on the Ubuntu server its 9.5.19
It will generate a migration: PRIV_PATH/repo/migrations/TIMESTAMP_create_user.ex so here is your duplicate in your migration. https://hexdocs.pm/pow/README.html
This turned out to be a completely different problem. After building release in a container, our devops team rsync that to a different server and they ran rsync in incremental mode, so an old file was a leftover from a previous rsync.
In Ecto migration, tables are added to DB from migration using timestamps as counters. In every Elixir migration file, you will see a DateTime string at the beginning of the name like this:
20230216222425_create_users.exs
Guessing with your error which I experienced myself, you modified the DateTime manually. Go through your migrations files again.