Skip to content

Commit 78f9389

Browse files
committed
Update deprecations
1 parent f3fb71b commit 78f9389

2 files changed

Lines changed: 0 additions & 51 deletions

File tree

lib/ecto/adapters/sql.ex

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,6 @@ defmodule Ecto.Adapters.SQL do
315315
_Postgrex_: Check [PostgreSQL doc](https://www.postgresql.org/docs/current/sql-explain.html)
316316
for version compatibility.
317317
318-
_MyXQL_: `EXTENDED` and `PARTITIONS` opts were [deprecated](https://dev.mysql.com/doc/refman/5.7/en/explain.html)
319-
and are enabled by default.
320-
321318
Also note that:
322319
323320
* Currently `:map`, `:yaml`, and `:text` format options are supported
@@ -635,30 +632,6 @@ defmodule Ecto.Adapters.SQL do
635632

636633
@doc false
637634
def __before_compile__(driver, _env) do
638-
case Application.get_env(:ecto, :json_library) do
639-
nil ->
640-
:ok
641-
642-
Jason ->
643-
IO.warn """
644-
Jason is the default :json_library in Ecto 3.0.
645-
You no longer need to configure it explicitly,
646-
please remove this line from your config files:
647-
648-
config :ecto, :json_library, Jason
649-
650-
"""
651-
652-
value ->
653-
IO.warn """
654-
The :json_library configuration for the :ecto application is deprecated.
655-
Please configure the :json_library in the driver instead:
656-
657-
config #{inspect driver}, :json_library, #{inspect value}
658-
659-
"""
660-
end
661-
662635
quote do
663636
@doc """
664637
A convenience function for SQL-based repositories that executes the given query.

lib/ecto/migrator.ex

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,6 @@ defmodule Ecto.Migrator do
216216
"""
217217
@spec up(Ecto.Repo.t, integer, module, Keyword.t) :: :ok | :already_up
218218
def up(repo, version, module, opts \\ []) do
219-
opts =
220-
if log_sql = opts[:log_sql] do
221-
IO.warn(":log_sql is deprecated, please use log_migrations_sql instead")
222-
Keyword.put(opts, :log_migrations_sql, log_sql)
223-
else
224-
opts
225-
end
226-
227219
conditional_lock_for_migrations module, version, repo, opts, fn config, versions ->
228220
if version in versions do
229221
:already_up
@@ -286,14 +278,6 @@ defmodule Ecto.Migrator do
286278
"""
287279
@spec down(Ecto.Repo.t, integer, module) :: :ok | :already_down
288280
def down(repo, version, module, opts \\ []) do
289-
opts =
290-
if log_sql = opts[:log_sql] do
291-
IO.warn(":log_sql is deprecated, please use log_migrations_sql instead")
292-
Keyword.put(opts, :log_migrations_sql, log_sql)
293-
else
294-
opts
295-
end
296-
297281
conditional_lock_for_migrations module, version, repo, opts, fn config, versions ->
298282
if version in versions do
299283
do_down(repo, config, version, module, opts)
@@ -408,14 +392,6 @@ defmodule Ecto.Migrator do
408392
"""
409393
@spec run(Ecto.Repo.t, String.t | [String.t] | [{integer, module}], atom, Keyword.t) :: [integer]
410394
def run(repo, migration_source, direction, opts) do
411-
opts =
412-
if log_sql = opts[:log_sql] do
413-
IO.warn(":log_sql is deprecated, please use log_migrations_sql instead")
414-
Keyword.put(opts, :log_migrations_sql, log_sql)
415-
else
416-
opts
417-
end
418-
419395
migration_source = List.wrap(migration_source)
420396

421397
pending =

0 commit comments

Comments
 (0)