Repository navigation
Identity columns
Added support for identity columns, which are the recommended alternative to Serial columns in Postgres:
from piccolo.columns import BigInt, Varchar
from piccolo.columns.generated import Identity
from piccolo.table import Table
class Band(Table):
id = BigInt(primary_key=True, generated=Identity())
name = Varchar()Tip
Using Serial and BigSerial primary keys is still fine - but consider using identity columns or UUID (with UUID7 defaults) for new tables.
Thanks to @mlbiche for suggesting this feature.
Other changes
Array(Numeric())columns in SQLite now returnDecimalvalues instead of floats (thanks to @b84330808 for the fix).- Fixed a bug with check constraints - strings containing quotes, and
timevalues, weren't being properly serialised (thanks to @youdie006 for the fix).