DROP TABLE IF EXISTS logs;
CREATE TABLE logs (
id INT,
record JSON,
message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED,
FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'
) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4;
INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}');
INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}');
INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}');
ALTER TABLE logs DROP COLUMN message;
SELECT * FROM logs;
id	record
1	{"level": "info", "message": "start"}
2	{"level": "info", "message": "restart"}
3	{"level": "warn", "message": "abort"}
DROP TABLE logs;
