phinx
phinx copied to clipboard
Documentation for the Literal class
I looked at https://github.com/cakephp/phinx/blob/master/docs/en/migrations.rst#custom-column-types--default-values but still can't really figure out how to apply this to generate mysql virtual columns. The example sql would be
ALTER TABLE `t_calendar_sources` ADD `c_flag_deleted` boolean GENERATED ALWAYS AS (IF((json_unquote(json_extract(`c_attr`,'$.deleted'))) = 'true', 1, 0)) VIRTUAL NOT NULL;"
Could anyone help out please?