diff --git a/installer/templates/phx_single/lib/app_name/application.ex b/installer/templates/phx_single/lib/app_name/application.ex index 65aad283e9..e195ff6a45 100644 --- a/installer/templates/phx_single/lib/app_name/application.ex +++ b/installer/templates/phx_single/lib/app_name/application.ex @@ -37,6 +37,6 @@ defmodule <%= @app_module %>.Application do defp skip_migrations?() do # By default, sqlite migrations are run when using a release - System.get_env("RELEASE_NAME") != nil + System.get_env("RELEASE_NAME") == nil end<% end %> end diff --git a/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex b/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex index 9043d6b742..d455ad2cbf 100644 --- a/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex +++ b/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex @@ -23,6 +23,6 @@ defmodule <%= @app_module %>.Application do defp skip_migrations?() do # By default, sqlite migrations are run when using a release - System.get_env("RELEASE_NAME") != nil + System.get_env("RELEASE_NAME") == nil end<% end %> end diff --git a/installer/test/phx_new_test.exs b/installer/test/phx_new_test.exs index baaeeb328b..73487e14e7 100644 --- a/installer/test/phx_new_test.exs +++ b/installer/test/phx_new_test.exs @@ -704,7 +704,7 @@ defmodule Mix.Tasks.Phx.NewTest do assert file =~ "skip: skip_migrations?()" assert file =~ "defp skip_migrations?() do" - assert file =~ ~s/System.get_env("RELEASE_NAME") != nil/ + assert file =~ ~s/System.get_env("RELEASE_NAME") == nil/ end) assert_file("custom_path/test/support/conn_case.ex", "DataCase.setup_sandbox(tags)") diff --git a/installer/test/phx_new_umbrella_test.exs b/installer/test/phx_new_umbrella_test.exs index 31a95ed3a4..1b97c6fdf7 100644 --- a/installer/test/phx_new_umbrella_test.exs +++ b/installer/test/phx_new_umbrella_test.exs @@ -635,7 +635,7 @@ defmodule Mix.Tasks.Phx.New.UmbrellaTest do assert file =~ "skip: skip_migrations?()" assert file =~ "defp skip_migrations?() do" - assert file =~ ~s/System.get_env("RELEASE_NAME") != nil/ + assert file =~ ~s/System.get_env("RELEASE_NAME") == nil/ end) assert_file(root_path(app, "config/dev.exs"), [~r/database: .*_dev.db/])