Releases: piccolo-orm/piccolo
1.27.0
1.26.1
Updated the BlackSheep ASGI template - thanks to @sinisaos for this.
Fixed a bug with auto migrations when a ForeignKey
specifies target_column
- multiple primary key columns were added to the migration file. Thanks to @waldner for reporting this issue.
Added a tutorial for moving tables between Piccolo apps - thanks to @sarvesh4396 for this.
1.26.0
1.25.0
Improvements to Piccolo app creation. When running the following:
piccolo app new my_app
It now validates that the app name (my_app
in this case) is valid as a Python package.
Also, there is now a --register
flag, which automatically adds the new app to the APP_REGISTRY
in piccolo_conf.py
.
piccolo app new my_app --register
Other changes:
1.24.2
Fixed a bug with delete
queries which have joins in the where
clause. For example:
>>> await Band.delete().where(Band.manager.name == 'Guido')
Thanks to @HakierGrzonzo for reporting the issue, and @sinisaos for the fix.
1.24.1
1.24.0
- Fixed a bug with
get_or_create
when a table has a column with bothnull=False
anddefault=None
- thanks to @bymoye for reporting this issue. - If a
PostgresEngine
uses thedsn
argument forasyncpg
, this is now used bypiccolo sql_shell run
. Thanks to @abhishek-compro for suggesting this. - Fixed the type annotation for the
length
argument ofVarchar
- it is allowed to beNone
. Thanks to @Compro-Prasad for this.
1.23.0
1.22.0
Python 3.13 is now officially supported.
JSON
/ JSONB
querying has been significantly improved. For example, if we have this table:
class RecordingStudio(Table):
facilities = JSONB()
And the facilities
column contains the following JSON data:
{
"technicians": [
{"name": "Alice Jones"},
{"name": "Bob Williams"},
]
}
We can get the first technician name as follows:
>>> await RecordingStudio.select(
... RecordingStudio.facilities["technicians"][0]["name"].as_alias("name")
... ).output(load_json=True)
[{'name': 'Alice Jones'}, ...]
TableStorage
(used for dynamically creating Piccolo Table
classes from an existing database) was improved, to support a Dockerised version of Piccolo Admin, which is coming soon.
1.21.0
Postgres 17 is now officially supported.
Fixed a bug with joins, when a ForeignKey
column had db_column_name
specified. Thanks to @jessemcl-flwls for reporting this issue.