Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

First deployment issues Mix.env and generated migration #154

Closed
johannesE opened this issue Sep 25, 2018 · 3 comments
Closed

First deployment issues Mix.env and generated migration #154

johannesE opened this issue Sep 25, 2018 · 3 comments

Comments

@johannesE
Copy link

Hi there

Thanks for this awesome project. I had absolutely no issues in development, but my first deployement went horribly. Here are the issues:

The migration ChangeAndConvertPageDataTypeInBackupsTable failed because of

{"init terminating in do_boot",{undef,[{nil,all,['Elixir.Thesis.Backup'],[]},{'Elixir.Databerg.Repo.Migrations.ChangeAndConvertPageDataTypeInBackupsTable',convert_and_map_page_data,0,[{file,"lib/databerg-4.7.6/priv/repo/migrations/20180925114963_change_and_convert_page_data_type_in_backups_table.exs"},{line,17}]},{'Elixir.Databerg.Repo.Migrations.ChangeAndConvertPageDataTypeInBackupsTable',change,0,[{file,"lib/databerg-4.7.6/priv/repo/migrations/20180925114963_change_and_convert_page_data_type_in_backups_table.exs"},{line,9}]},{timer,tc,3,[{file,"timer.erl"},{line,197}]},{'Elixir.Ecto.Migration.Runner',run,6,[{file,"lib/ecto/migration/runner.ex"},{line,25}]},{'Elixir.Ecto.Migrator',attempt,6,[{file,"lib/ecto/migrator.ex"},{line,128}]},{'Elixir.Ecto.Migrator','-do_up/4-fun-1-',4,[{file,"lib/ecto/migrator.ex"},{line,73}]},{'Elixir.Ecto.Adapters.SQL','-do_transaction/3-fun-1-',3,[{file,"lib/ecto/adapters/sql.ex"},{line,576}]}]}}

This is something I cannot explain. Especially since there are no Backups present. And because it worked on my machine. I just removed everything in the change function and only put

    alter table(:thesis_backups) do
      modify :page_data, :text
    end

Which seems to work for now. 🤔

Second issue is Mix.env in production in the notifications.

|> notifications_regarding_env(Mix.env)

I tried uncommenting the notifications config in config/config.exs, but that doesn't change the fact that this function uses Mix.env. Has anyone tried to run the code in production?

@jamonholmgren
Copy link
Member

Hey @johannesE , sorry about the late reply and thank you for the kind words!

I'm going to see if @yulolimum can take a look at these issues. Thanks for bringing them to our attention.

@johannesE
Copy link
Author

@yulolimum could you take a look at these issues?

Balt87 added a commit to Balt87/thesis-phoenix that referenced this issue Feb 15, 2019
Balt87 added a commit to Balt87/thesis-phoenix that referenced this issue Feb 18, 2019
@johannesE
Copy link
Author

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants