 
     contents =
       case File.read(file) do
-        {:ok, bin} -> bin
-        {:error, _} -> """
-          import Config
-
-          if config_env() == :prod do
-          end
-        """
+        {:ok, bin} ->
+          bin
+
+        {:error, _} ->
+          """
+            import Config
+
+            if config_env() == :prod do
+            end
+          """
       end
 
     case split_with_self(contents, "if config_env() == :prod do") do

      adapter_module: adapter_module,
      adapter_config: adapter_config,
      generators: nil_if_empty(project.generators ++ adapter_generators(adapter_config)),
      namespaced?: namespaced?(project),
    ]

    %Project{project | binding: binding}

  defp get_ecto_adapter("mssql", app, module) do
    {:tds, Ecto.Adapters.Tds, db_config(app, module, "sa", "some!Password")}
  end

  defp get_ecto_adapter("mysql", app, module) do
    {:myxql, Ecto.Adapters.MyXQL, db_config(app, module, "root", "")}
  end

  defp get_ecto_adapter("postgres", app, module) do
    {:postgrex, Ecto.Adapters.Postgres, db_config(app, module, "postgres", "postgres")}
  end

  defp get_ecto_adapter(db, _app, _mod) do
    Mix.raise("Unknown database #{inspect(db)}")
  end

  defp db_config(app, module, user, pass) do
    [
      dev: [
        username: user,
        password: pass,
        database: "#{app}_dev",
        hostname: "localhost",
        show_sensitive_data_on_connection_error: true
      ],
      test: [
        username: user,
        password: pass,
        database: {:literal, ~s|"#{app}_test\#{System.get_env("MIX_TEST_PARTITION")}"|},
        hostname: "localhost",
        pool: Ecto.Adapters.SQL.Sandbox
      ],
      test_setup_all: "Ecto.Adapters.SQL.Sandbox.mode(#{inspect(module)}.Repo, :manual)",
      test_setup: """
          pid = Ecto.Adapters.SQL.Sandbox.start_owner!(#{inspect(module)}.Repo, shared: not tags[:async])
          on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)\
      """
    ]
  end

  defp kw_to_config(kw) do
    Enum.map(kw, fn
      {k, {:literal, v}} -> ",\n  #{k}: #{v}"
      {k, v} -> ",\n  #{k}: #{inspect(v)}"
    end)
  end

