silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
722 stars 822 forks source link

InnoDB presently supports one FULLTEXT index creation at a time #9629

Open chillu opened 4 years ago

chillu commented 4 years ago

With InnoDB (which is the new default engine in 4.6), you can't create two FULLTEXT indexes in the same dev/build. Since it doesn't create the first one either, this is a persistent error that can't be resolved without direct ALTER TABLE database queries.

Example of a failing definition on DataObject:

    private static $indexes = [
        'PrioritySearchFields' => [
            'type' => 'fulltext',
            'columns' => ['Title'],
        ],
        'AllSearchFields' => [
            'type' => 'fulltext',
            'columns' => ['Title', 'Description'],
        ]
    ];
maxime-rainville commented 4 years ago

I presum this limitation is "per table"? So if you have a fulltext index on a Company DataObject and a fulltext index on an Employee DataObject, your dev/build will complete normally.

chillu commented 4 years ago

That's correct, per table. But to be clear, this isn't resolved by running dev/build a second time - it's a persistent error until you remove the second index definition.