phinx icon indicating copy to clipboard operation
phinx copied to clipboard

Documentation for the Literal class

Open killua-eu opened this issue 5 years ago • 0 comments

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?

killua-eu avatar Apr 13 '20 10:04 killua-eu