   alias FunWithFlags.Store.Persistent.Ecto.Record
   alias FunWithFlags.Store.Serializer.Ecto, as: Serializer
 
-  import FunWithFlags.Config, only: [ecto_repo: 0, ecto_table_name: 0]
+  import FunWithFlags.Config, only: [ecto_repo: 0]
   import Ecto.Query
 
   require Logger

  end


  defp transaction_with_lock_postgres(repo, upsert_fn) do
    repo.transaction fn() ->
      postgres_table_lock!(repo)
      upsert_fn.()
    end
  end

  defp transaction_with_lock_mysql(repo, upsert_fn) do
    repo.transaction fn() ->
      if mysql_lock!(repo) do

    repo = ecto_repo()

    transaction_fn = case db_type(repo) do
      :postgres -> build_transaction_with_lock_postgres_fn(flag_name)
      :mysql -> &transaction_with_lock_mysql/2
    end

