コンテンツへスキップ
メニュー
この質問にフラグが付けられました
207 ビュー

Hi,


I want to execute a migration script that will change a field type from m2o to char, with data migrations (m2o.name will become the value of the char field)

The trick is I want to do it in one time, with no traces of the m2o field left in the code.


I am currently here : 
I've done a pre script, to rename the field from some_m2o_field to old_some_m2o_field

And a post-script to migrate the datas to the new_char_field, and remove old_some_m2o_field


With that, I have an error that old_some_m2o_field doesn't exists in post script

I think the field is not in the code, and even if I rename it, it's removed during the module update.

I also tried to move the field to another module (base), but I have the same results

How can I achieve what I want to do ?

アバター
破棄