@@ -217,6 +217,17 @@ def _simple_schema(
217217 if "probeset_nullable" in kwargs :
218218 overrides .setdefault ("data_probeset_id" , {})["nullable" ] = kwargs .pop ("probeset_nullable" )
219219
220+ # Build index list, excluding TEXT columns (can't be indexed in MySQL)
221+ index_columns = list (DEFAULT_INDEX )
222+ if "data_probeset_id" in overrides and overrides ["data_probeset_id" ].get ("type" ) == "text" :
223+ index_columns = [col for col in index_columns if col != "data_probeset_id" ]
224+ if "data_bot_id" in overrides and overrides ["data_bot_id" ].get ("type" ) == "text" :
225+ index_columns = [col for col in index_columns if col != "data_bot_id" ]
226+
227+ # Allow manual index override if specified
228+ if "index" not in kwargs :
229+ kwargs ["index" ] = index_columns
230+
220231 return EfpSchemaBuilder ._build_schema (
221232 charset = charset ,
222233 column_overrides = overrides ,
@@ -261,13 +272,18 @@ def _schema_with_qa_columns(
261272 extra_columns = kwargs .pop ("extra_columns" , [])
262273 all_extra_cols = qa_cols + extra_columns
263274
275+ # Build index list - exclude data_probeset_id if it's TEXT type
276+ index_columns = ["data_probeset_id" ]
277+ if kwargs .get ("probeset_type" ) == "text" :
278+ index_columns = []
279+
264280 return EfpSchemaBuilder ._simple_schema (
265281 species = species ,
266282 sample_regex = sample_regex ,
267283 probeset_len = probeset_len ,
268284 bot_id_len = bot_id_len ,
269285 extra_columns = all_extra_cols ,
270- index = [ "data_probeset_id" ] ,
286+ index = index_columns ,
271287 ** kwargs ,
272288 )
273289
0 commit comments