     Map.drop(model, [:__struct__, :__meta__] ++ relationships)
   end
 
-  def convert_to_string_map(map) do
+  defp reset_all_data() do
+    @repo.delete_all(Person)
+    @repo.delete_all(Company)
+    @repo.delete_all(Version)
+
+    Person
+    |> MultiTenant.add_prefix_to_query()
+    |> @repo.delete_all()
+
+    Company
+    |> MultiTenant.add_prefix_to_query()
+    |> @repo.delete_all()
+
+    Version
+    |> MultiTenant.add_prefix_to_query()
+    |> @repo.delete_all()
+  end
+
+  defp convert_to_string_map(map) do
     map |> Poison.encode! |> Poison.decode!
   end
 end

    Application.put_env(:paper_trail, :repo, PaperTrail.Repo)
    Code.eval_file("lib/paper_trail.ex")
    Code.eval_file("lib/version.ex")
    :ok
  end

  setup do
    @repo.delete_all(Person)
    @repo.delete_all(Company)
    @repo.delete_all(Version)
    on_exit fn ->
      @repo.delete_all(Person)
      @repo.delete_all(Company)
      @repo.delete_all(Version)
    end
    :ok
  end

  alias PaperTrail.Version
  alias SimpleCompany, as: Company
  alias SimplePerson, as: Person
  alias PaperTrailTest.MultiTenantHelper, as: MultiTenant

  @repo PaperTrail.RepoClient.repo
  @create_company_params %{name: "Acme LLC", is_active: true, city: "Greenwich"}
