2020-04-06 22:26:11 +02:00
|
|
|
# 4.6.0 (Unreleased)
|
|
|
|
|
|
|
|
## Overview {#overview}
|
|
|
|
|
|
|
|
* [MySQL tables are auto-converted from MyISAM to InnoDB](#myisam)
|
2020-03-05 02:59:30 +01:00
|
|
|
* [Editing files directly in the insert-media modal](#in-modal-editing)
|
|
|
|
|
2020-04-06 22:26:11 +02:00
|
|
|
## MySQL tables are auto-converted from MyISAM to InnoDB {#myisam}
|
|
|
|
|
|
|
|
Beginning with [4.4.0](https://docs.silverstripe.org/en/4/changelogs/4.4.0/),
|
|
|
|
our minimum requirement for MySQL is 5.6 (since MySQL 5.5 end of life reached in December 2018).
|
|
|
|
Starting with MySQL 5.6, [InnoDB](https://dev.mysql.com/doc/refman/5.6/en/innodb-introduction.html)
|
|
|
|
is the new default storage engine,
|
|
|
|
replacing the older [MyISAM](https://dev.mysql.com/doc/refman/5.6/en/myisam-storage-engine.html) engine.
|
|
|
|
|
|
|
|
Silverstripe CMS already creates InnoDB tables by default,
|
|
|
|
mainly in order to benefit from their better support for database transactions.
|
|
|
|
Before MySQL 5.6, InnoDB didn't have a `FULLTEXT` search index,
|
|
|
|
requiring us to enforce the MyISAM engine when devs opted into this index type
|
|
|
|
in their particular setup. There are a few ways in which this opt-in can happen:
|
|
|
|
|
|
|
|
* Adding the [FulltextSearchable](https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/Search/FulltextSearchable.php)
|
2020-03-05 02:59:30 +01:00
|
|
|
extension to a DataObject, as described in our
|
2020-04-06 22:26:11 +02:00
|
|
|
[search docs](https://docs.silverstripe.org/en/4/developer_guides/search/fulltextsearch/)
|
|
|
|
* Defining `'type' => 'fulltext'` in `DataObject::$db` column definitions
|
|
|
|
* Implementing [DBIndexable](https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/FieldType/DBIndexable.php)
|
|
|
|
on a custom `DBField` subclass.
|
|
|
|
* Setting `'ENGINE=MyISAM'` in `DataObject::$create_table_options`
|
2020-03-05 02:59:30 +01:00
|
|
|
|
2020-04-06 22:26:11 +02:00
|
|
|
This search index is not required to enable simple text search
|
|
|
|
in the "Pages" section of the CMS, or any ModelAdmin implementations.
|
|
|
|
We generally recommend to choose a more powerful
|
|
|
|
[search addon](https://addons.silverstripe.org/add-ons?search=fulltext&type=&sort=downloads)
|
2020-03-05 02:59:30 +01:00
|
|
|
(e.g. based on Solr or ElasticSearch) for website frontend search use cases.
|
2020-04-06 22:26:11 +02:00
|
|
|
|
|
|
|
As of 4.6.0, a `dev/build` will automatically switch MyISAM tables to InnoDB,
|
|
|
|
which automatically recreates any indexes required. If you have large indexes,
|
|
|
|
this can extend the duration if this task. As usual, back up your database
|
|
|
|
before upgrading, and test upgrades on non-production systems first.
|
|
|
|
Our tests indicate that indexes with thousands of records and screen pages
|
2020-03-05 02:59:30 +01:00
|
|
|
worth of content (15MB index size) are converted in a few seconds.
|
2020-04-06 22:26:11 +02:00
|
|
|
|
|
|
|
In order to opt out of this change, you can set the engine explicitly
|
|
|
|
for your DataObject implementations:
|
|
|
|
|
|
|
|
```php
|
|
|
|
use SilverStripe\ORM\Connect\MySQLSchemaManager;
|
|
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
|
|
|
|
class MyDataObject extends DataObject
|
|
|
|
{
|
|
|
|
private static $create_table_options = [
|
|
|
|
MySQLSchemaManager::ID => 'ENGINE=MyISAM'
|
|
|
|
];
|
|
|
|
}
|
2020-03-05 02:59:30 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Editing files directly in the insert-media modal{#in-modal-editing}
|
|
|
|
|
|
|
|
Editors can now directly edit file details when selecting a file in an UploadField or when inserting media in a
|
|
|
|
HTMLEditorField. The "image placement" and "file link" forms that show when inserting an image or a link in an
|
|
|
|
HTMLEditorField have been simplified.
|
|
|
|
|
|
|
|
This does mean that the order and structure of fields have changed somewhat. If you have customised the forms in the
|
|
|
|
asset administration area or in the "Insert Media Modal", you should do some regression testing when upgrading to
|
|
|
|
make sure your customisations still work as expected.
|
|
|
|
|
|
|
|
If your project uses the popular [jonom/focuspoint](https://github.com/jonom/silverstripe-focuspoint) community
|
|
|
|
module, you should upgrade it as well.
|
|
|
|
|
|
|
|
<!--- Changes below this line will be automatically regenerated -->
|
|
|
|
|
|
|
|
<!--- Changes above this line will be automatically regenerated -->
|