diff --git a/lib/ecto/migration/schema_migration.ex b/lib/ecto/migration/schema_migration.ex index bf3768cc..a3d792e1 100644 --- a/lib/ecto/migration/schema_migration.ex +++ b/lib/ecto/migration/schema_migration.ex @@ -17,7 +17,9 @@ defmodule Ecto.Migration.SchemaMigration do @default_opts [ timeout: :infinity, log: false, + # Keep schema_migration for backwards compatibility schema_migration: true, + ecto_query: :schema_migration, telemetry_options: [schema_migration: true] ] diff --git a/test/support/test_repo.exs b/test/support/test_repo.exs index cf94c898..824417b9 100644 --- a/test/support/test_repo.exs +++ b/test/support/test_repo.exs @@ -55,7 +55,7 @@ defmodule EctoSQL.TestAdapter do def execute(_, _, {:nocache, {:all, query}}, _, opts) do %{from: %{source: {"schema_migrations", _}}} = query - true = opts[:schema_migration] + :schema_migrations = opts[:ecto_query] versions = MigrationsAgent.get() {length(versions), Enum.map(versions, &[elem(&1, 0)])} end @@ -63,13 +63,13 @@ defmodule EctoSQL.TestAdapter do def execute(_, _, {:nocache, {:delete_all, query}}, params, opts) do %{from: %{source: {"schema_migrations", _}}} = query [version] = params - true = opts[:schema_migration] + :schema_migrations = opts[:ecto_query] MigrationsAgent.down(version, opts) {1, nil} end def insert(_, %{source: "schema_migrations"}, val, _, _, opts) do - true = opts[:schema_migration] + :schema_migrations = opts[:ecto_query] version = Keyword.fetch!(val, :version) MigrationsAgent.up(version, opts) {:ok, []}