     Enum.sort(current_nodes) != Enum.sort(work_nodes)
   end
 
-  defp work?(:clustered, :feature_table_created, work_nodes) do
+  defp work?(:clustered, :feature_table_created, work_nodes), do: table_created?(:clustered, :feature, work_nodes)
+  defp work?(:clustered, :webhook_table_created, work_nodes), do: table_created?(:clustered, :webhook, work_nodes)
+
+  defp table_created?(:clustered, table_name, work_nodes) do
     ensure!(:clustered, :schema_created, work_nodes)
 
     ensure_mnesia_started(work_nodes)
 
     [primary_node | _nodes] = work_nodes # not actually primary, just the first one
     table_info = :rpc.call(primary_node, :mnesia, :system_info, [:tables])
-    not (table_info |> Enum.member?(:feature))
+    not (table_info |> Enum.member?(table_name))
   end
 
-  defp work?(:clustered, :webhook_table_created, work_nodes) do
-    ensure!(:clustered, :schema_created, work_nodes)
-
-    ensure_mnesia_started(work_nodes)
-
-    [primary_node | _nodes] = work_nodes # not actually primary, just the first one
-    table_info = :rpc.call(primary_node, :mnesia, :system_info, [:tables])
-    not (table_info |> Enum.member?(:webhook))
-  end
 
   defp work!(:local, :schema_created, work_nodes) do
     :application.stop :mnesia
     :mnesia.create_schema(work_nodes)
   end
 
-  defp work!(:local, :feature_table_created, work_nodes) do
+  defp work!(:local, :feature_table_created, work_nodes), do: create_table!(:local, :feature, work_nodes)
+  defp work!(:local, :webhook_table_created, work_nodes), do: create_table!(:local, :webhook, work_nodes)
+
+  defp create_table!(:local, table_name, work_nodes) do
     :application.ensure_started(:mnesia)
-    tab_def = [ attributes: [:id, :feature], disc_copies: work_nodes]
-    case :mnesia.create_table(:feature, tab_def) do
-      {:atomic, :ok}      -> :ok
-      {:aborted, reason}  -> {:error, reason}
-    end
-  end
-
-  defp work!(:local, :webhook_table_created, work_nodes) do
-    :application.ensure_started(:mnesia)
-    tab_def = [ attributes: [:id, :webhook], disc_copies: work_nodes]
-    case :mnesia.create_table(:webhook, tab_def) do
+    tab_def = [ attributes: [:id, table_name], disc_copies: work_nodes]
+    case :mnesia.create_table(table_name, tab_def) do
       {:atomic, :ok}      -> :ok
                              {:aborted, reason}  -> {:error, reason}
     end

    :rpc.call(primary_node, :mnesia, :create_schema, [work_nodes])
  end

  defp work!(:clustered, :feature_table_created, work_nodes) do
    ensure_mnesia_started(work_nodes)

    [primary_node | _nodes] = work_nodes # not actually primary, just the first one
    tab_def = [ attributes: [:id, :feature], disc_copies: work_nodes]
    case :rpc.call(primary_node, :mnesia, :create_table, [:feature, tab_def]) do
      {:atomic, :ok}      -> :ok
      {:aborted, reason}  -> {:error, reason}
    end
  end

  defp work!(:clustered, :webhook_table_created, work_nodes) do
    ensure_mnesia_started(work_nodes)

    [primary_node | _nodes] = work_nodes # not actually primary, just the first one
    tab_def = [ attributes: [:id, :webhook], disc_copies: work_nodes]
    case :rpc.call(primary_node, :mnesia, :create_table, [:webhook, tab_def]) do
      {:atomic, :ok}      -> :ok
                             {:aborted, reason}  -> {:error, reason}
    end

    Enum.sort(:mnesia.table_info(:schema, :disc_copies)) != Enum.sort(work_nodes)
  end

  defp work?(:local, :feature_table_created, work_nodes), do: table_created?(:local, :feature, work_nodes)
  defp work?(:local, :webhook_table_created, work_nodes), do: table_created?(:local, :webhook, work_nodes)

  defp table_created?(:local, table_name, work_nodes) do
    ensure!(:local, :schema_created, work_nodes)
    :application.ensure_started(:mnesia)
    not (:mnesia.system_info(:tables) |> Enum.member?(table_name))
  end

  defp work?(:clustered, :schema_created, work_nodes) do
