Closed SomewhatCloudy closed 4 years ago
So it seems to be failing on the table test_events_search
, with the following:
'CREATE TABLE
test_events_search(
event_idINT UNSIGNED NOT NULL,
idINT UNSIGNED AUTO_INCREMENT NOT NULL,
bodyLONGTEXT NOT NULL, INDEX
test_events_search_event_id(event_id), FULLTEXT INDEX
test_events_search_body(body), PRIMARY KEY(
id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci **ENGINE = InnoDB'**
But in the test entity itself, it specifies:
// MyISAM table for FULLTEXT searching
protected static $tableOptions = [
**'engine' => 'MyISAM'**
];
Which seems to be being ignored. Unless I am missing something this is the actual issue, which my edit is bringing to light. Maybe a further test needs to be made to check if the table created is MyISAM or InnoDB?
The current code assumes that "fulltext" searching is MyISAM only (which it was). Looks like it needs to be updated to support newer MySQL versions. We probably need to ensure that "fulltext" can only be set with "MyISAM" as the engine when MySQL is under a certain version, but that would require an additional check.
Either that, or we just assume the user knows what they are doing, and try to run the operations no matter the "engine" specified?
Added support for Fulltext Indexes in the Migrator. Since MySQL 5.6 InnoDB now supports them.