Commit c03ef25
committed
Fix TEXT columns in primary keys causing MySQL error
MySQL doesn't allow TEXT/BLOB columns in primary keys without a key length.
When bot_id_type='text' or probeset_type='text' is specified, the column
type changes to TEXT but was still marked as primary_key=True, causing:
OperationalError: (1170, "BLOB/TEXT column 'data_bot_id' used in key
specification without a key length")
Changes:
- In _simple_schema(), when probeset_type='text', set primary_key=False
- In _simple_schema(), when bot_id_type='text', set primary_key=False
- Ensures data_signal remains a primary key for all databases
Affected databases (11 total):
- affydb, canola, canola_original, canola_seed
- hnahal, human, humandb
- meristemdb, rohan, rpatel, tomato_atlas
All 58 tests pass with 5,643 subtests.1 parent a5d07a8 commit c03ef25
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
| |||
0 commit comments