Skip to content

Releases: django-commons/django-simple-history

Release 3.1.1

23 Apr 17:38
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.1.0...3.1.1

Release 3.1.0

23 Apr 01:01
Compare
Choose a tag to compare

Breaking Changes

  • Dropped support for Django 2.2 (gh-968)
  • Dropped support for Django 3.1 (gh-952)
  • Dropped support for Python 3.6, which reached end-of-life on 2021-12-23 (gh-946)

Upgrade Implications

  • Run makemigrations after upgrading to realize the benefit of indexing changes.

Full list of changes

  • Added queryset-based filtering with as_of (gh-397)
  • Added index on history_date column; opt-out with setting SIMPLE_HISTORY_DATE_INDEX (gh-565)
  • RecordModels now support a no_db_index setting, to drop indices in historical models,
    default stays the same (gh-720)
  • Support included_fields for history.diff_against (gh-776)
  • Improve performance of history.diff_against by reducing number of queries to 0 in most cases (gh-776)
  • Fixed prev_record and next_record performance when using excluded_fields (gh-791)
  • Fixed update_change_reason in pk (gh-806)
  • Fixed bug where serializer of djangorestframework crashed if used with OrderingFilter (gh-821)
  • Fixed make format so it works by using tox (gh-859)
  • Fixed bug where latest() is not idempotent for identical history_date records (gh-861)
  • Added excluded_field_kwargs to support custom OneToOneField that have
    additional arguments that don't exist on ForeignKey. (gh-870)
  • Added Czech translations (gh-885)
  • Added ability to break into debugger on unit test failure (gh-890)
  • Added pre-commit for better commit quality (gh-896)
  • Russian translations update (gh-897)
  • Added support for Django 4.0 (gh-898)
  • Added Python 3.10 to test matrix (gh-899)
  • Fix bug with history.diff_against with non-editable fields (gh-923)
  • Added HistoricForeignKey (gh-940)
  • Support change reason formula feature. Change reason formula can be defined by overriding
    get_change_reason_for_object method after subclassing HistoricalRecords (gh-962)

Release 3.0.0

16 Apr 23:06
df66df4
Compare
Choose a tag to compare

Breaking changes:

  • Removed support for Django 3.0
  • Removed changeReason in favor of _change_reason (see 2.10.0)

Full list of changes:

  • Removed support for Django versions prior to 2.2 (gh-652)
  • Migrate from TravisCI to Github Actions (gh-739)
  • Add Python 3.9 support (gh-745)
  • Support ignore_conflicts in bulk_create_with_history (gh-733)
  • Use asgiref when available instead of thread locals (gh-747)
  • Sort imports with isort (gh-751)
  • Queryset history.as_of speed improvements by calculating in the DB (gh-758)
  • Increase black and isort python version to 3.6 (gh-817)
  • Remove Django 3.0 support (gh-817)
  • Add Django 3.2 support (gh-817)
  • Improve French translations (gh-811)
  • Remove support for changeReason (gh-819)

Release 2.12.0

14 Oct 21:00
5f02c07
Compare
Choose a tag to compare
  • Add default date to bulk_create_with_history and bulk_update_with_history (gh-687)
  • Exclude ManyToManyFields when using bulk_create_with_history (gh-699)
  • Added --excluded_fields argument to clean_duplicate_history command (gh-674)
  • Exclude ManyToManyFields when fetching excluded fields (gh-707)
  • Use default model manager for bulk_create_with_history and
    bulk_update_with_history instead of objects (gh-703)
  • Add optional manager argument to bulk_update_with_history to use instead of
    the default manager (gh-703)
  • Add support for Django 3.1 (gh-713)
  • Fix a bug with clean_old_history command's --days argument (gh-722)

* NOTE: This will be the last minor release before 3.0.0.

Release 2.11.0

20 Jun 15:48
5ac5aca
Compare
Choose a tag to compare
  • Added clean_old_history management command (gh-675)
  • Added user_db_constraint param to history to avoid circular reference on delete (gh-676)
  • Leverages get_user from HistoricalRecords in order to set a fallback user on
    bulk update and bulk create (gh-677)

Release 2.10.0

27 Apr 14:36
d19b52f
Compare
Choose a tag to compare
  • Added bulk_update_with_history utility function (gh-650)
  • Add default user and default change reason to bulk_create_with_history and bulk_update_with_history (gh-653)
  • Add french translation (gh-654)
  • Start using _change_reason instead of changeReason to add change reasons to historical
    objects. changeReason is deprecated and will be removed in version 3.0.0 (gh-655)

Release 2.9.0

23 Apr 18:13
f47eb3f
Compare
Choose a tag to compare
  • Add simple filtering if provided a minutes argument in clean_duplicate_history (gh-606)
  • Add setting to convert FileField to CharField instead of TextField (gh-625)
  • Added notes on BitBucket Pipelines (gh-627)
  • import model ContentType in SimpleHistoryAdmin using django_apps.get_model
    to avoid possible AppRegistryNotReady exception (gh-630)
  • Fix utils.update_change_reason when user specifies excluded_fields (gh-637)
  • Changed how now is imported from timezone (timezone module is imported now) (gh-643)
  • settings.SIMPLE_HISTORY_REVERT_DISABLED if True removes the Revert
    button from the history form for all historical models (gh-632))

Release 2.8.0

02 Dec 16:10
ec0dca3
Compare
Choose a tag to compare
  • Fixed bulk_create_with_history support for HistoryRecords with relation_name attribute (gh-591)
  • Added support for bulk_create_with_history for databases different from PostgreSQL (gh-577)
  • Fixed DoesNotExist error when trying to get instance if object is deleted (gh-571)
  • Fix model_to_dict to detect changes in a parent model when using
    inherit=True (backwards-incompatible for users who were directly
    using previous version) (gh-576)
  • Use an iterator for clean_duplicate_history (gh-604)
  • Add support for Python 3.8 and Django 3.0 (gh-610)

Release 2.7.3

16 Jul 15:24
1e1b7ab
Compare
Choose a tag to compare
  • Fixed BigAutoField not mirrored as BigInt (gh-556)
  • Fixed most_recent() bug with excluded_fields (gh-561)
  • Added official Django 2.2 support (gh-555)

Release 2.7.2

17 Apr 14:35
af20c82
Compare
Choose a tag to compare
  • Fixed ModuleNotFound issue for six (gh-553)