Current section

65 Versions

Jump to

Compare versions

28 files changed
+388 additions
-1559 deletions
  @@ -1,5 +1,19 @@
1 1 # Changelog for v3.x
2 2
3 + ## v3.2.0 (2019-09-07)
4 +
5 + This new version requires Elixir v1.6+.
6 +
7 + ### Enhancements
8 +
9 + * [sql] Use `get_dynamic_repo` on SQL-specific functions
10 + * [sql] Respect `Ecto.Type.embed_as/2` choice when loading/dumping embeds (Ecto 3.2+ compat)
11 + * [sql] Support CTE expressions (Ecto 3.2+ compat)
12 +
13 + ### Bug fixes
14 +
15 + * [sql] Fix generated "COMMENT ON INDEX" for PostgreSQL
16 +
3 17 ## v3.1.6 (2019-06-27)
4 18
5 19 ### Enhancements
  @@ -34,7 +34,7 @@ You can run tests against a specific Ecto adapter by using the `ECTO_ADAPTER` en
34 34
35 35 "Ecto" and the Ecto logo are Copyright (c) 2012 Plataformatec.
36 36
37 - The source code is under the Apache 2 License.
37 + The source code is under the Apache License 2.0.
38 38
39 39 Copyright (c) 2012 Plataformatec
  @@ -1,16 +1,16 @@
1 1 {<<"app">>,<<"ecto_sql">>}.
2 2 {<<"build_tools">>,[<<"mix">>]}.
3 3 {<<"description">>,<<"SQL-based adapters for Ecto and database migrations">>}.
4 - {<<"elixir">>,<<"~> 1.5">>}.
4 + {<<"elixir">>,<<"~> 1.6">>}.
5 5 {<<"files">>,
6 6 [<<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>,<<"CHANGELOG.md">>,
7 - <<"lib">>,<<"lib/ecto">>,<<"lib/ecto/adapter">>,
7 + <<"lib">>,<<"lib/.DS_Store">>,<<"lib/ecto">>,<<"lib/ecto/.DS_Store">>,
8 + <<"lib/ecto/adapter">>,<<"lib/ecto/adapter/.DS_Store">>,
8 9 <<"lib/ecto/adapter/migration.ex">>,<<"lib/ecto/adapter/structure.ex">>,
9 10 <<"lib/ecto/adapters">>,<<"lib/ecto/adapters/myxql">>,
10 11 <<"lib/ecto/adapters/myxql/connection.ex">>,<<"lib/ecto/adapters/sql.ex">>,
11 12 <<"lib/ecto/adapters/postgres">>,
12 13 <<"lib/ecto/adapters/postgres/connection.ex">>,
13 - <<"lib/ecto/adapters/mysql">>,<<"lib/ecto/adapters/mysql/connection.ex">>,
14 14 <<"lib/ecto/adapters/mysql.ex">>,<<"lib/ecto/adapters/myxql.ex">>,
15 15 <<"lib/ecto/adapters/postgres.ex">>,<<"lib/ecto/adapters/sql">>,
16 16 <<"lib/ecto/adapters/sql/stream.ex">>,
  @@ -18,14 +18,15 @@
18 18 <<"lib/ecto/adapters/sql/connection.ex">>,
19 19 <<"lib/ecto/adapters/sql/application.ex">>,<<"lib/ecto/migration.ex">>,
20 20 <<"lib/ecto/migrator.ex">>,<<"lib/ecto/migration">>,
21 - <<"lib/ecto/migration/supervisor.ex">>,<<"lib/ecto/migration/runner.ex">>,
21 + <<"lib/ecto/migration/runner.ex">>,
22 22 <<"lib/ecto/migration/schema_migration.ex">>,<<"lib/mix">>,
23 - <<"lib/mix/tasks">>,<<"lib/mix/tasks/ecto.migrations.ex">>,
24 - <<"lib/mix/tasks/ecto.dump.ex">>,<<"lib/mix/tasks/ecto.rollback.ex">>,
25 - <<"lib/mix/tasks/ecto.migrate.ex">>,
23 + <<"lib/mix/tasks">>,<<"lib/mix/tasks/.DS_Store">>,
24 + <<"lib/mix/tasks/ecto.migrations.ex">>,<<"lib/mix/tasks/ecto.dump.ex">>,
25 + <<"lib/mix/tasks/ecto.rollback.ex">>,<<"lib/mix/tasks/ecto.migrate.ex">>,
26 26 <<"lib/mix/tasks/ecto.gen.migration.ex">>,<<"lib/mix/tasks/ecto.load.ex">>,
27 - <<"lib/mix/ecto_sql.ex">>,<<"integration_test/sql">>,
28 - <<"integration_test/sql/migrator.exs">>,<<"integration_test/sql/lock.exs">>,
27 + <<"lib/mix/.DS_Store">>,<<"lib/mix/ecto_sql.ex">>,
28 + <<"integration_test/sql">>,<<"integration_test/sql/migrator.exs">>,
29 + <<"integration_test/sql/lock.exs">>,
29 30 <<"integration_test/sql/transaction.exs">>,
30 31 <<"integration_test/sql/alter.exs">>,<<"integration_test/sql/stream.exs">>,
31 32 <<"integration_test/sql/sql.exs">>,<<"integration_test/sql/sandbox.exs">>,
  @@ -35,7 +36,7 @@
35 36 <<"integration_test/support/file_helpers.exs">>,
36 37 <<"integration_test/support/migration.exs">>,
37 38 <<"integration_test/support/repo.exs">>]}.
38 - {<<"licenses">>,[<<"Apache 2.0">>]}.
39 + {<<"licenses">>,[<<"Apache-2.0">>]}.
39 40 {<<"links">>,[{<<"GitHub">>,<<"https://github.com/elixir-ecto/ecto_sql">>}]}.
40 41 {<<"name">>,<<"ecto_sql">>}.
41 42 {<<"requirements">>,
  @@ -43,7 +44,7 @@
43 44 {<<"name">>,<<"ecto">>},
44 45 {<<"optional">>,false},
45 46 {<<"repository">>,<<"hexpm">>},
46 - {<<"requirement">>,<<"~> 3.1.0">>}],
47 + {<<"requirement">>,<<"~> 3.2.0">>}],
47 48 [{<<"app">>,<<"telemetry">>},
48 49 {<<"name">>,<<"telemetry">>},
49 50 {<<"optional">>,false},
  @@ -53,20 +54,15 @@
53 54 {<<"name">>,<<"db_connection">>},
54 55 {<<"optional">>,false},
55 56 {<<"repository">>,<<"hexpm">>},
56 - {<<"requirement">>,<<"~> 2.0">>}],
57 + {<<"requirement">>,<<"~> 2.1">>}],
57 58 [{<<"app">>,<<"postgrex">>},
58 59 {<<"name">>,<<"postgrex">>},
59 60 {<<"optional">>,true},
60 61 {<<"repository">>,<<"hexpm">>},
61 - {<<"requirement">>,<<"~> 0.14.0 or ~> 0.15.0">>}],
62 - [{<<"app">>,<<"mariaex">>},
63 - {<<"name">>,<<"mariaex">>},
64 - {<<"optional">>,true},
65 - {<<"repository">>,<<"hexpm">>},
66 - {<<"requirement">>,<<"~> 0.9.1">>}],
62 + {<<"requirement">>,<<"~> 0.15.0">>}],
67 63 [{<<"app">>,<<"myxql">>},
68 64 {<<"name">>,<<"myxql">>},
69 65 {<<"optional">>,true},
70 66 {<<"repository">>,<<"hexpm">>},
71 67 {<<"requirement">>,<<"~> 0.2.0">>}]]}.
72 - {<<"version">>,<<"3.1.6">>}.
68 + {<<"version">>,<<"3.2.0">>}.
  @@ -9,7 +9,7 @@ defmodule Ecto.Integration.SandboxTest do
9 9
10 10 describe "errors" do
11 11 test "raises if repo is not started or not exist" do
12 - assert_raise RuntimeError, ~r"could not lookup UnknownRepo because it was not started", fn ->
12 + assert_raise RuntimeError, ~r"could not lookup Ecto repo UnknownRepo because it was not started", fn ->
13 13 Sandbox.mode(UnknownRepo, :manual)
14 14 end
15 15 end
  @@ -27,6 +27,11 @@ defmodule Ecto.Integration.SQLTest do
27 27 assert result.rows == [[[text1, text2]]]
28 28 end
29 29
30 + test "query!/4 with dynamic repo" do
31 + TestRepo.put_dynamic_repo(:unknown)
32 + assert_raise RuntimeError, ~r/:unknown/, fn -> TestRepo.query!("SELECT 1") end
33 + end
34 +
30 35 test "query!/4" do
31 36 result = TestRepo.query!("SELECT 1")
32 37 assert result.rows == [[1]]
Loading more files…