Version 6 pre-stable
This version of Silverstripe CMS has not yet been given a stable release. See the release roadmap for more information. Go to documentation for the most recent stable version.

5.4.0 (unreleased)

Overview

Features and enhancements

Option to change ClassName column from enum to varchar

On websites with very large database tables it can take a long time to run dev/build, which can be a problem when deploying changes to production. This is because the ClassName column is an enum type which requires an a ALTER TABLE query to be run affecting every row whenever there is a new valid value for the column. For a very rough benchmark, running an ALTER TABLE query on a database table of 10 million records took 28.52 seconds on a mid-range 2023 laptop, though this time will vary depending on the database and hardware being used.

This release introduces a new configuration option to change the ClassName column to a varchar type which removes the need to run ALTER TABLE whenever there is a new valid value.

Enabling this will result in a trade-off where the size of the database will increase by approximately 7 MB per 100,000 rows. There will also be a very slow initial dev/build as all of the ClassName columns are switched to varchar. To enable this, add the following configuration:

SilverStripe\ORM\DataObject:
  fixed_fields:
    ClassName: DBClassNameVarchar

SilverStripe\ORM\FieldType\DBPolymorphicForeignKey:
  composite_db:
    Class: "DBClassNameVarchar('SilverStripe\\ORM\\DataObject', ['index' => false])"

Reports quality of life updates

Numerous slight adjustments have been made to the ReportAdmin class for a better experience.

The changes include:

  • Search capability added (making use of PartialMatchFilter)
  • Sorting by columns now posssible
  • Default Sort is now Title ASC
  • Reports list is now paginated
  • Description is now displayed in the list as a column

Other new features

API changes

Bug fixes

This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release!