On a server I have this:
select * from schema_migrations ;
version | inserted_at
---------+-------------
(0 rows)
But when I'm running "migrate" in my Phoenix application via edeliver
$ mix edeliver migrate production --verbose
I get this:
response: RPC to '[email protected]' failed: {'EXIT',
{#{'__exception__' => true,
'__struct__' => 'Elixir.Ecto.MigrationError',
message => <<"migrations can't be executed, migration version 20160827023221 is duplicated">>},
[{'Elixir.Ecto.Migrator',
ensure_no_duplication,1,
[{file,"lib/ecto/migrator.ex"},
{line,254}]},
{'Elixir.Ecto.Migrator',migrate,4,
[{file,"lib/ecto/migrator.ex"},
{line,235}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,187}]}]}}
MIGRATE DONE!
Neither do I have 2 files with the same migration number locally.
I had a same kind of problem after renaming the migration file. Deleting generated application files by using 'mix clean' command helped in my case.
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