Fix issues caused by `unique` being a `cached_property`.
Review Request #14745 — Created Dec. 23, 2025 and submitted — Latest diff uploaded
Django 5.1 changed
Field.uniqueto be@cached_propertyinstead of
@property. For sqlite, we were setting the internal_unique
attribute, but with the caching, that wouldn't update. We therefore have
to overwrite the publicuniqueflag on newer versions, while still
using_uniqueon 5.0 and below.
Ran unit tests.