Let's say I have a table inventory with columns item_id, category and size.
item_idis auto incremented integer (primary key)categoryis ENUMsizeis ENUM
I want size to be a conditional ENUM. By "conditional", it means for category=shoes, size has values of 5, 6, 7, 8, 35, 36, 37, 38, etc., while for category=tshirt, size has the values of S, M, L, etc.
For an item with category=shoes, its size should not be allowed as S.
What's the right way to solve this problem?