Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ecto/adapters/sql.ex
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ defmodule Ecto.Adapters.SQL do
The table is checked against the current database/schema in the connection.
"""
@spec table_exists?(Ecto.Repo.t(), table :: String.t(), opts :: Keyword.t()) :: boolean
def table_exists?(repo, table, opts \\ []) when is_atom(repo) do
def table_exists?(repo, table, opts \\ []) when is_atom(repo) or is_pid(repo) do
%{sql: sql} = adapter_meta = Ecto.Adapter.lookup_meta(repo)
{query, params} = sql.table_exists_query(table)
query!(adapter_meta, query, params, opts).num_rows != 0
Expand Down
Loading