Ecto Migration Can't be executed, Migration name is duplicated

Hi Everyone,

I am using Phoenix for a game application and while everything works great I am stuck with this one issue with Ecto migrations.

When running migrations no matter if the database is empty or not, it throws the following error.

(Ecto.MigrationError) migrations can’t be executed, migration name create_users is duplicated (ecto_sql) lib/ecto/migrator.ex:572: Ecto.Migrator.ensure_no_duplication!/1 (ecto_sql) lib/ecto/migrator.ex:414: Ecto.Migrator.run/4 (ecto_sql) lib/ecto/migrator.ex:142: Ecto.Migrator.with_repo/3 (game_of_fortune) lib/game_of_fortune/release.ex:10: anonymous fn/2 in GameOfFortune.Release.migrate/0 (elixir) lib/enum.ex:1948: Enum.“-reduce/3-lists^foldl/2-0-”/3 (game_of_fortune) lib/game_of_fortune/release.ex:9: GameOfFortune.Release.migrate/0 (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6 Build step ‘Execute shell’ marked build as failure Finished: FAILURE

I am running the migration from the release as defined in Phoenix deployment documentation.

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