forked from piccolo-orm/piccolo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
489 lines (396 loc) · 12.5 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
Changes
=======
0.17.5
------
Catching database connection exceptions when starting the default ASGI app
created with ``piccolo asgi new`` - these errors exist if the Postgres
database hasn't been created yet.
0.17.4
------
Added a ``help_text`` option to the ``Table`` metaclass. This is used in
Piccolo Admin to show tooltips.
0.17.3
------
Added a ``help_text`` option to the ``Column`` constructor. This is used in
Piccolo Admin to show tooltips.
0.17.2
------
* Exposing ``index_type`` in the ``Column`` constructor.
* Fixing a typo with ``start_connection_pool` and ``close_connection_pool`` -
thanks to paolodina for finding this.
* Fixing a typo in the ``PostgresEngine`` docs - courtesy of paolodina.
0.17.1
------
Fixing a bug with ``SchemaSnapshot`` if column types were changed in migrations
- the snapshot didn't reflect the changes.
0.17.0
------
* Migrations now directly import ``Column`` classes - this allows users to
create custom ``Column`` subclasses. Migrations previously only worked with
the builtin column types.
* Migrations now detect if the column type has changed, and will try and
convert it automatically.
0.16.5
------
The Postgres extensions that ``PostgresEngine`` tries to enable at startup
can now be configured.
0.16.4
------
* Fixed a bug with ``MyTable.column != None``
* Added ``is_null`` and ``is_not_null`` methods, to avoid linting issues when
comparing with None.
0.16.3
------
* Added ``WhereRaw``, so raw SQL can be used in where clauses.
* ``piccolo shell run`` now uses syntax highlighting - courtesy of Fingel.
0.16.2
------
Reordering the dependencies in requirements.txt when using ``piccolo asgi new``
as the latest FastAPI and Starlette versions are incompatible.
0.16.1
------
Added ``Timestamptz`` column type, for storing datetimes which are timezone
aware.
0.16.0
------
* Fixed a bug with creating a ``ForeignKey`` column with ``references="self"``
in auto migrations.
* Changed migration file naming, so there are no characters in there which
are unsupported on Windows.
0.15.1
------
Changing the status code when creating a migration, and no changes were
detected. It now returns a status code of 0, so it doesn't fail build scripts.
0.15.0
------
Added ``Bytea`` / ``Blob`` column type.
0.14.13
-------
Fixing a bug with migrations which drop column defaults.
0.14.12
-------
* Fixing a bug where re-running ``Table.create(if_not_exists=True)`` would
fail if it contained columns with indexes.
* Raising a ``ValueError`` if a relative path is provided to ``ForeignKey``
``references``. For example, ``.tables.Manager``. The paths must be absolute
for now.
0.14.11
-------
Fixing a bug with ``Boolean`` column defaults, caused by the ``Table``
metaclass not being explicit enough when checking falsy values.
0.14.10
-------
* The ``ForeignKey`` ``references`` argument can now be specified using a
string, or a ``LazyTableReference`` instance, rather than just a ``Table``
subclass. This allows a ``Table`` to be specified which is in a Piccolo app,
or Python module. The ``Table`` is only loaded after imports have completed,
which prevents circular import issues.
* Faster column copying, which is important when specifying joins, e.g.
``await Band.select(Band.manager.name).run()``.
* Fixed a bug with migrations and foreign key contraints.
0.14.9
------
Modified the exit codes for the ``forwards`` and ``backwards`` commands when no
migrations are left to run / reverse. Otherwise build scripts may fail.
0.14.8
------
* Improved the method signature of the ``output`` query clause (explicitly
added args, instead of using ``**kwargs``).
* Fixed a bug where ``output(as_list=True)`` would fail if no rows were found.
* Made ``piccolo migrations forwards`` command output more legible.
* Improved renamed table detection in migrations.
* Added the ``piccolo migrations clean`` command for removing orphaned rows
from the migrations table.
* Fixed a bug where ``get_migration_managers`` wasn't inclusive.
* Raising a ``ValueError`` if ``is_in`` or ``not_in`` query clauses are passed
an empty list.
* Changed the migration commands to be top level async.
* Combined ``print`` and ``sys.exit`` statements.
0.14.7
------
* Added missing type annotation for ``run_sync``.
* Updating type annotations for column default values - allowing callables.
* Replaced instances of ``asyncio.run`` with ``run_sync``.
* Tidied up aiosqlite imports.
0.14.6
------
* Added JSON and JSONB column types, and the arrow function for JSONB.
* Fixed a bug with the distinct clause.
* Added ``as_alias``, so select queries can override column names in the
response (i.e. SELECT foo AS bar from baz).
* Refactored JSON encoding into a separate utils file.
0.14.5
------
* Removed old iPython version recommendation in the ``piccolo shell run`` and
``piccolo playground run``, and enabled top level await.
* Fixing outstanding mypy warnings.
* Added optional requirements for the playground to setup.py
0.14.4
------
* Added ``piccolo sql_shell run`` command, which launches the psql or sqlite3
shell, using the connection parameters defined in ``piccolo_conf.py``.
This is convenient when you want to run raw SQL on your database.
* ``run_sync`` now handles more edge cases, for example if there's already
an event loop in the current thread.
* Removed asgiref dependency.
0.14.3
------
* Queries can be directly awaited - ``await MyTable.select()``, as an
alternative to using the run method ``await MyTable.select().run()``.
* The ``piccolo asgi new`` command now accepts a ``name`` argument, which is
used to populate the default database name within the template.
0.14.2
------
* Centralised code for importing Piccolo apps and tables - laying the
foundation for fixtures.
* Made orjson an optional dependency, installable using
``pip install piccolo[orjson]``.
* Improved version number parsing in Postgres.
0.14.1
------
Fixing a bug with dropping tables in auto migrations.
0.14.0
------
Added ``Interval`` column type.
0.13.5
------
* Added ``allowed_hosts`` to ``create_admin`` in ASGI template.
* Fixing bug with default ``root`` argument in some piccolo commands.
0.13.4
------
* Fixed bug with ``SchemaSnapshot`` when dropping columns.
* Added custom ``__repr__`` method to ``Table``.
0.13.3
------
Added ``piccolo shell run`` command for running adhoc queries using Piccolo.
0.13.2
------
* Fixing bug with auto migrations when dropping columns.
* Added a ``root`` argument to ``piccolo asgi new``, ``piccolo app new`` and
``piccolo project new`` commands, to override where the files are placed.
0.13.1
------
Added support for ``group_by`` and ``Count`` for aggregate queries.
0.13.0
------
Added `required` argument to ``Column``. This allows the user to indicate which
fields must be provided by the user. Other tools can use this value when
generating forms and serialisers.
0.12.6
------
* Fixing a typo in ``TimestampCustom`` arguments.
* Fixing bug in ``TimestampCustom`` SQL representation.
* Added more extensive deserialisation for migrations.
0.12.5
------
* Improved ``PostgresEngine`` docstring.
* Resolving rename migrations before adding columns.
* Fixed bug serialising ``TimestampCustom``.
* Fixed bug with altering column defaults to be non-static values.
* Removed ``response_handler`` from ``Alter`` query.
0.12.4
------
Using orjson for JSON serialisation when using the ``output(as_json=True)``
clause. It supports more Python types than ujson.
0.12.3
------
Improved ``piccolo user create`` command - defaults the username to the current
system user.
0.12.2
------
Fixing bug when sorting ``extra_definitions`` in auto migrations.
0.12.1
------
* Fixed typos.
* Bumped requirements.
0.12.0
------
* Added ``Date`` and ``Time`` columns.
* Improved support for column default values.
* Auto migrations can now serialise more Python types.
* Added ``Table.indexes`` method for listing table indexes.
* Auto migrations can handle adding / removing indexes.
* Improved ASGI template for FastAPI.
0.11.8
------
ASGI template fix.
0.11.7
------
* Improved ``UUID`` columns in SQLite - prepending 'uuid:' to the stored value
to make the type more explicit for the engine.
* Removed SQLite as an option for ``piccolo asgi new`` until auto migrations
are supported.
0.11.6
------
Added support for FastAPI to ``piccolo asgi new``.
0.11.5
------
Fixed bug in ``BaseMigrationManager.get_migration_modules`` - wasn't
excluding non-Python files well enough.
0.11.4
------
* Stopped ``piccolo migrations new`` from creating a config.py file - was
legacy.
* Added a README file to the `piccolo_migrations` folder in the ASGI template.
0.11.3
------
Fixed `__pycache__` bug when using ``piccolo asgi new``.
0.11.2
------
* Showing a warning if trying auto migrations with SQLite.
* Added a command for creating a new ASGI app - ``piccolo asgi new``.
* Added a meta app for printing out the Piccolo version -
``piccolo meta version``.
* Added example queries to the playground.
0.11.1
------
* Added ``table_finder``, for use in ``AppConfig``.
* Added support for concatenating strings using an update query.
* Added more tables to the playground, with more column types.
* Improved consistency between SQLite and Postgres with ``UUID`` columns,
``Integer`` columns, and ``exists`` queries.
0.11.0
------
Added ``Numeric`` and ``Real`` column types.
0.10.8
------
Fixing a bug where Postgres versions without a patch number couldn't be parsed.
0.10.7
------
Improving release script.
0.10.6
------
Sorting out packaging issue - old files were appearing in release.
0.10.5
------
Auto migrations can now run backwards.
0.10.4
------
Fixing some typos with ``Table`` imports. Showing a traceback when piccolo_conf
can't be found by ``engine_finder``.
0.10.3
------
Adding missing jinja templates to setup.py.
0.10.2
------
Fixing a bug when using ``piccolo project new`` in a new project.
0.10.1
------
Fixing bug with enum default values.
0.10.0
------
Using targ for the CLI. Refactored some core code into apps.
0.9.3
-----
Suppressing exceptions when trying to find the Postgres version, to avoid
an ``ImportError`` when importing `piccolo_conf.py`.
0.9.2
-----
``.first()`` bug fix.
0.9.1
-----
Auto migration fixes, and ``.first()`` method now returns None if no match is
found.
0.9.0
-----
Added support for auto migrations.
0.8.3
-----
Can use operators in update queries, and fixing 'new' migration command.
0.8.2
-----
Fixing release issue.
0.8.1
-----
Improved transaction support - can now use a context manager. Added ``Secret``,
``BigInt`` and ``SmallInt`` column types. Foreign keys can now reference the
parent table.
0.8.0
-----
Fixing bug when joining across several tables. Can pass values directly into
the ``Table.update`` method. Added ``if_not_exists`` option when creating a
table.
0.7.7
-----
Column sequencing matches the definition order.
0.7.6
-----
Supporting `ON DELETE` and `ON UPDATE` for foreign keys. Recording reverse
foreign key relationships.
0.7.5
-----
Made ``response_handler`` async. Made it easier to rename columns.
0.7.4
-----
Bug fixes and dependency updates.
0.7.3
-----
Adding missing `__int__.py` file.
0.7.2
-----
Changed migration import paths.
0.7.1
-----
Added ``remove_db_file`` method to ``SQLiteEngine`` - makes testing easier.
0.7.0
-----
Renamed ``create`` to ``create_table``, and can register commands via
`piccolo_conf`.
0.6.1
-----
Adding missing `__init__.py` files.
0.6.0
-----
Moved ``BaseUser``. Migration refactor.
0.5.2
-----
Moved drop table under ``Alter`` - to help prevent accidental drops.
0.5.1
-----
Added ``batch`` support.
0.5.0
-----
Refactored the ``Table`` Metaclass - much simpler now. Scoped more of the
attributes on ``Column`` to avoid name clashes. Added ``engine_finder`` to make
database configuration easier.
0.4.1
-----
SQLite is now returning datetime objects for timestamp fields.
0.4.0
-----
Refactored to improve code completion, along with bug fixes.
0.3.7
-----
Allowing ``Update`` queries in SQLite
0.3.6
-----
Falling back to `LIKE` instead of `ILIKE` for SQLite
0.3.5
-----
Renamed ``User`` to ``BaseUser``.
0.3.4
-----
Added ``ilike``.
0.3.3
-----
Added value types to columns.
0.3.2
-----
Default values infer the engine type.
0.3.1
-----
Update click version.
0.3
---
Tweaked API to support more auto completion. Join support in where clause.
Basic SQLite support - mostly for playground.
0.2
---
Using ``QueryString`` internally to represent queries, instead of raw strings,
to harden against SQL injection.
0.1.2
-----
Allowing joins across multiple tables.
0.1.1
-----
Added playground.