Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ecto from 2.1.6 to 3.0.0 #304

Closed
wants to merge 1 commit into from

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps ecto from 2.1.6 to 3.0.0.

Release notes

Sourced from ecto's releases.

v2.2.0-rc.1

Regressions

  • [Ecto.UUID] Remove UUID version validation as it is not part of the RFC
  • [Ecto.Adapters.Postgres] No longer add parens to migration index expression in order to support NULL/ASC/DESC

Enhancements

  • [Ecto.Changeset] Add unsafe_validate_unique/3 which validates uniqueness for faster feedback cycles but without data-integrity guarantees
  • [Ecto.Query] Support aggregations in type/2 in select
  • [Ecto.Schema] Support [**field**](https://github.com/field)_source_mapper in Ecto.Schema as a mechanism to programatically set the :source option

2.2.0-rc.0

Highlights

This release adds many improvements to Ecto with a handful of bug fixes. We recommend reading the full list of enhancements below. Here are some of the highlights.

Ecto now supports specifying fields sources. This is useful when you use a database with non-conventional names, such as uppercase letters or names with hyphens:

field :name, :string, source: :NAME
field :user_name, :string, source: :"user-name"

On the migrations side, execute/2 function was added, which allows developers to describe up and down commands inside the change callback:

def change do
  execute "CREATE EXTENSION citext",
          "DROP EXTENSION citext"
end

The ecto.migrate and ecto.rollback tasks have also been enhanced with the --log-sql option which is helpful when debugging errors or during deployments to keep track of your production database changes.

Ecto now will also warn at compile time of invalid relationships, such as a belongs_to that points to a schema that does not exist.

The query syntax also seen some improvements: map updates are supported in subqueries, the new Ecto.Query.select_merge/3 makes it easier to write composable select clauses in queries and the type/2 macro has been extended to support casting of fragments and fields in schemaless queries.

Finally, the UPSERT support added on Ecto v2.1 is getting more improvements: the {:constraint, constraint} is now supported as conflict target and the :returning option was added to Ecto.Repo.insert/2, mirroring the behaviour of insert_all.

v2.2.0-rc.0 (2017-08-08)

Enhancements

  • [Ecto.Adapters] Accept IO data from adapters to reduce memory usage when performing large queries
  • [Ecto.Adapters.SQL] Also add Ecto.Repo.to_sql/2 to Ecto.Repo based on SQL adapters
  • [Ecto.Adapters.Postgres] Use the "postgres" database for create/drop database commands
  • [Ecto.Adapters.MySQL] Use TCP connections instead of MySQL command client to create & drop database
  • [Ecto.Changeset] Support action: :ignore in changeset which is useful when casting associations and embeds and one or more children need to be rejected/ignored under certain circumstances
  • [Ecto.Changeset] Add :repo_opts field to Ecto.Changeset which are given as options to to the repository whenever an operation is performed
  • [Ecto.Changeset] Add apply_action/2
  • [Ecto.Changeset] Add prefix constraint name checking to constraint validations
  • [Ecto.Changeset] Allow assocs and embeds in change/2 and put_change/3 - this gives a more generic API for developers to work that does not require explicit knowledge of the field type
... (truncated)
Changelog

Sourced from ecto's changelog.

v3.0.0 (2018-10-29)

Enhancements

  • [Ecto.Adapters.MySQL] Add ability to specify cli_protocol for ecto.create and ecto.drop commands
  • [Ecto.Adapters.PostgreSQL] Add ability to specify maintenance database name for PostgreSQL adapter for ecto.create and ecto.drop commands
  • [Ecto.Changeset] Store constraint name in error metadata for constraints
  • [Ecto.Changeset] Add validations/1 and constraints/1 instead of allowing direct access on the struct fields
  • [Ecto.Changeset] Add :force_update option when casting relations, to force an update even if there are no changes
  • [Ecto.Migration] Migrations now lock the migrations table in order to avoid concurrent migrations in a cluster. The type of lock can be configured via the :migration_lock repository configuration and defaults to "FOR UPDATE" or disabled if set to nil
  • [Ecto.Migration] Add :migration_default_prefix repository configuration
  • [Ecto.Migration] Add reversible version of remove/2 subcommand
  • [Ecto.Migration] Add support for non-empty arrays as defaults in migrations
  • [Ecto.Migration] Add support for logging notices/alerts/warnings when running migrations (only supported by Postgres currently)
  • [Ecto.Migrator] Warn when migrating and there is a higher version already migrated in the database
  • [Ecto.Multi] Add support for anonymous functions in insert/4, update/4, insert_or_update/4, and delete/4
  • [Ecto.Query] Support tuples in where and having, allowing queries such as where: {p.foo, p.bar} > {^foo, ^bar}
  • [Ecto.Query] Support arithmetic operators in queries as a thin layer around the DB functionality
  • [Ecto.Query] Allow joins in queries to be named via :as and allow named bindings
  • [Ecto.Query] Support excluding specific join types in exclude/2
  • [Ecto.Query] Allow virtual field update in subqueries
  • [Ecto.Query] Support coalesce/2 in queries, such as select: coalesce(p.title, p.old_title)
  • [Ecto.Query] Support filter/2 in queries, such as select: filter(count(p.id), p.public == true)
  • [Ecto.Query] The :prefix and :hints options are now supported on both from and join expressions
  • [Ecto.Query] Support :asc_nulls_last, :asc_nulls_first, :desc_nulls_last, and :desc_nulls_first in order_by
  • [Ecto.Query] Allow variables (sources) to be given in queries, for example, useful for invoking functins, such as fragment("some_function(?)", p)
  • [Ecto.Query] Add support for union, union_all, intersection, intersection_all, except and except_all
  • [Ecto.Query] Add support for windows and over
  • [Ecto.Query] Raise when comparing a string with a charlist during planning
  • [Ecto.Repo] Only start transactions if an association or embed has changed, this reduces the overhead during repository operations
  • [Ecto.Repo] Support :replace_all_except_primary_key as :on_conflict strategy
  • [Ecto.Repo] Support {:replace, fields} as :on_conflict strategy
  • [Ecto.Repo] Support :unsafe_fragment as :conflict_target
  • [Ecto.Repo] Support select in queries given to update_all and delete_all
  • [Ecto.Repo] Add Repo.exists?/2
  • [Ecto.Repo] Add Repo.checkout/2 - useful when performing multiple operations in short-time to interval, allowing the pool to be bypassed
  • [Ecto.Repo] Add :stale_error_field to Repo.insert/update/delete that converts Ecto.StaleEntryError into a changeset error. The message can also be set with :stale_error_message
  • [Ecto.Repo] Preloading now only sorts results by the relationship key instead of sorting by the whole struct
  • [Ecto.Schema] Allow :where option to be given to has_many/has_one/belongs_to/many_to_many. many_to_many also supports :join_through_where

Bug fixes

  • [Ecto.Inspect] Do not fail when inspecting query expressions which have a number of bindings more than bindings available
  • [Ecto.Migration] Keep double underscores on autogenerated index names to be consistent with changesets
  • [Ecto.Query] Fix Ecto.Query.API.map/2 for single nil column with join
  • [Ecto.Migration] Ensure create_if_not_exists is properly reversible
  • [Ecto.Repo] Allow many_to_many associations to be preloaded via a function (before the behaviour was erratic)
  • [Ecto.Schema] Make autogen ID loading work with custom type
  • [Ecto.Schema] Make updated_at have the same value as inserted_at
  • [Ecto.Schema] Ensure all fields are replaced with on_conflict: :replace_all/:replace_all_except_primary_key and not only the fields sent as changes
... (truncated)
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

Bumps [ecto](https://github.com/elixir-ecto/ecto) from 2.1.6 to 3.0.0.
- [Release notes](https://github.com/elixir-ecto/ecto/releases)
- [Changelog](https://github.com/elixir-ecto/ecto/blob/master/CHANGELOG.md)
- [Commits](elixir-ecto/ecto@v2.1.6...v3.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
@nathany
Copy link

nathany commented Nov 1, 2018

this is fixed by #301

@germsvel germsvel closed this Nov 2, 2018
@dependabot-preview
Copy link
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@germsvel germsvel deleted the dependabot/hex/ecto-3.0.0 branch November 2, 2018 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants