zut.db.pg.enforce_pg_sequence_offset
- zut.db.pg.enforce_pg_sequence_offset(connection: Connection | None = None, app_label: str | None = None, *, min_offset: int | None = None, max_offset: int | None = None)
Ensure the given model (or all models if none is given) have sequence starting with a minimal value. This leaves space for custom, programmatically defined values.
Unless min_offset and max_offset are specified, the minimal value is randomly chosen between 65537 (after max uint16 value) and 262144 (max uint18 value).
Compatible with postgresql only.