   """
   def create_mnesia_db do
     Logger.info "Stopping Mnesia for creating the schema"
-    Ecto.Mnesia.Storage.stop()
+    EctoMnesia.Storage.stop()
 
     # ensure the database directory
     dir = "#{Confex.get(:mnesia, :dir)}"

    #Logger.info "Ensure that :baumeister_web is started"
    # {:ok, _} = Application.ensure_all_started(:baumeister_web)
    Logger.info("Start Mnesia for migration")
    :ok = Ecto.Mnesia.Storage.start()
    Logger.info "Waiting for all tables to come back"
    :ok = :mnesia.wait_for_tables(:mnesia.system_info(:tables), 5_000)


    if :mnesia.system_info(:use_dir) do
      Logger.info "Mnesia dir is in use already"
    else
      conf = EctoMnesia.Storage.conf()
      Logger.info("Start Mnesia for Schema creation with conf: #{inspect conf}")
      # EctoMnesia.Storage.start()

      Logger.info "Create Schema with storage up"
      case EctoMnesia.Storage.storage_up(conf) do
        :ok -> Logger.info "Schema created"
        {:ok, :already_created} -> Logger.info "Schema was already created"
        {:error, :already_up} -> Logger.error "Mnesia was already up -> continue!"
      end
      # stop mnesia for restarting later when the application starts
      Logger.info "Stopping Mnesia after schema creation"
      EctoMnesia.Storage.stop()
    end
  end

