@@ -733,7 +733,12 @@ protected function createIndex(Index $resource): bool
733733 /**
734734 * @var array<UtopiaDocument> $tableColumns
735735 */
736- $ tableColumns = $ table ->getAttribute ('attributes ' );
736+ $ tableColumns = $ table ->getAttribute ('attributes ' , []);
737+
738+ /**
739+ * @var array<UtopiaDocument> $tableIndexes
740+ */
741+ $ tableIndexes = $ table ->getAttribute ('indexes ' , []);
737742
738743 $ oldColumns = \array_map (
739744 fn ($ attr ) => $ attr ->getArrayCopy (),
@@ -840,9 +845,16 @@ protected function createIndex(Index $resource): bool
840845
841846 $ validator = new IndexValidator (
842847 $ tableColumns ,
848+ $ tableIndexes ,
843849 $ this ->database ->getAdapter ()->getMaxIndexLength (),
844850 $ this ->database ->getAdapter ()->getInternalIndexesKeys (),
845851 $ this ->database ->getAdapter ()->getSupportForIndexArray (),
852+ $ this ->database ->getAdapter ()->getSupportForSpatialIndexNull (),
853+ $ this ->database ->getAdapter ()->getSupportForSpatialIndexOrder (),
854+ $ this ->database ->getAdapter ()->getSupportForVectors (),
855+ $ this ->database ->getAdapter ()->getSupportForAttributes (),
856+ $ this ->database ->getAdapter ()->getSupportForMultipleFulltextIndexes (),
857+ $ this ->database ->getAdapter ()->getSupportForIdenticalIndexes (),
846858 );
847859
848860 if (!$ validator ->isValid ($ index )) {
0 commit comments