I use MariaDB for a Symfony project and have setup a computed column with:
ALTER TABLE history_event ADD quote_status_change SMALLINT AS (JSON_VALUE(payload, '$.change_set.status[1]'));
When I run Doctrine migrations with bin/console doctrine:schema:update
, the computed column is dropped, probably because it doesn't appear anywhere in the HistoryEvent
entity class.
How can I prevent Doctrine from dropping computed columns when I run migrations ?