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 piccolo from 0.114.0 to 0.115.0 #704

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 20, 2023

Bumps piccolo from 0.114.0 to 0.115.0.

Release notes

Sourced from piccolo's releases.

0.115.0

Fixture upserting

Fixtures can now be upserted. For example:

piccolo fixtures load my_fixture.json --on_conflict='DO UPDATE'

The options are:

  • DO NOTHING, meaning any rows with a matching primary key will be left alone.
  • DO UPDATE, meaning any rows with a matching primary key will be updated.

This is really useful, as you can now edit fixtures and load them multiple times without getting foreign key constraint errors.

Schema fixes

We recently added support for schemas, for example:

class Band(Table, schema='music'):
    ...

This release contains:

  • A fix for migrations when changing a table's schema back to 'public' (thanks to @​sinisaos for discovering this).
  • A fix for M2M queries, when the tables are in a schema other than 'public' (thanks to @​quinnalfaro for reporting this).

Added distinct method to count queries

We recently added support for COUNT DISTINCT queries. The syntax is:

await Concert.count(distinct=[Concert.start_date])

The following alternative syntax now also works (just to be consistent with other queries like select):

await Concert.count().distinct([Concert.start_date])
Changelog

Sourced from piccolo's changelog.

0.115.0

Fixture upserting


Fixtures can now be upserted. For example:

.. code-block:: bash

piccolo fixtures load my_fixture.json --on_conflict='DO UPDATE'

The options are:

  • DO NOTHING, meaning any rows with a matching primary key will be left alone.
  • DO UPDATE, meaning any rows with a matching primary key will be updated.

This is really useful, as you can now edit fixtures and load them multiple times without getting foreign key constraint errors.

Schema fixes


We recently added support for schemas, for example:

.. code-block:: python

class Band(Table, schema='music'):
...

This release contains:

  • A fix for migrations when changing a table's schema back to 'public' (thanks to
    @sinisaos for discovering this).
  • A fix for M2M queries, when the tables are in a schema other than
    'public' (thanks to @quinnalfaro for reporting this).

Added distinct method to count queries
</code></pre>
<p>We recently added support for <code>COUNT DISTINCT</code> queries. The syntax is:</p>
<p>.. code-block:: python</p>
<p>await Concert.count(distinct=[Concert.start_date])</p>
<p>The following alternative syntax now also works (just to be consistent with
other queries like <code>select</code>):</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>

<ul>
<li><a href="https://github.com/piccolo-orm/piccolo/commit/74ea10d427464b05d4a0caba05ce317582d74203&quot;&gt;&lt;code&gt;74ea10d&lt;/code&gt;&lt;/a> fix typo in changelog</li>
<li><a href="https://github.com/piccolo-orm/piccolo/commit/1457ded03a491da1d34b913be1eb9e4f724a5650&quot;&gt;&lt;code&gt;1457ded&lt;/code&gt;&lt;/a> bumped version</li>
<li><a href="https://github.com/piccolo-orm/piccolo/commit/f1a47ec944b32d671978848c60d76af2ede27ec2&quot;&gt;&lt;code&gt;f1a47ec&lt;/code&gt;&lt;/a> add <code>distinct</code> method to <code>count</code> queries (<a href="https://redirect.github.com/piccolo-orm/piccolo/issues/846&quot;&gt;#846&lt;/a&gt;)&lt;/li>
<li><a href="https://github.com/piccolo-orm/piccolo/commit/4c56cde574ff5f81fe52d29849cfe73f8d3bfebe&quot;&gt;&lt;code&gt;4c56cde&lt;/code&gt;&lt;/a> Allow upserts when loading fixtures (<a href="https://redirect.github.com/piccolo-orm/piccolo/issues/840&quot;&gt;#840&lt;/a&gt;)&lt;/li>
<li><a href="https://github.com/piccolo-orm/piccolo/commit/f0abe2ce3622c4ac3d78afc5131cf59779d2b342&quot;&gt;&lt;code&gt;f0abe2c&lt;/code&gt;&lt;/a> Fix M2M queries when in a schema (<a href="https://redirect.github.com/piccolo-orm/piccolo/issues/843&quot;&gt;#843&lt;/a&gt;)&lt;/li>
<li>See full diff in <a href="https://github.com/piccolo-orm/piccolo/compare/0.114.0...0.115.0&quot;&gt;compare view</a></li>
</ul>
</details>

<br />

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 squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor 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)

Bumps [piccolo](https://github.com/piccolo-orm/piccolo) from 0.114.0 to 0.115.0.
- [Release notes](https://github.com/piccolo-orm/piccolo/releases)
- [Changelog](https://github.com/piccolo-orm/piccolo/blob/master/CHANGES.rst)
- [Commits](piccolo-orm/piccolo@0.114.0...0.115.0)

---
updated-dependencies:
- dependency-name: piccolo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jun 20, 2023
@github-actions github-actions bot enabled auto-merge June 20, 2023 03:59
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #704 (b1c3d24) into main (72860f2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #704   +/-   ##
=======================================
  Coverage   95.66%   95.66%           
=======================================
  Files          35       35           
  Lines         946      946           
=======================================
  Hits          905      905           
  Misses         41       41           

@github-actions github-actions bot merged commit ef00be3 into main Jun 20, 2023
@dependabot dependabot bot deleted the dependabot/pip/piccolo-0.115.0 branch June 20, 2023 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant