How/Can I override a field type in a different stream?
Created 8 years ago by daviesgeek

I am trying to change the field type in a different stream namespace. Is this possible and if so, how can I do this?

Use case: I'm trying to use the forum module, but I'd like to change the posts to a WYSIWYG field instead of just a text box. I'd prefer not to have to fork it, but rather just create a migration that'll change it.

ryanthompson  —  8 years ago Best Answer

Check out the video on migrations: http://pyrocms.com/videos/series/module-development/module-migrations

You will wanna use the repository methods.

1.) Delete the field 2.) Create the field 3.) Assign the field (hint, you'll need the stream)

ryanthompson  —  8 years ago

As of right this moment changing is not supported - but you can delete the field - then create / assign your own with the same name.

Good thought on that btw - I like that idea.

daviesgeek  —  8 years ago

@ryanthompson Thanks! What would be the best way to delete the field in a migration so it can be easily migrated and then rolled back?

ryanthompson  —  8 years ago Best Answer

Check out the video on migrations: http://pyrocms.com/videos/series/module-development/module-migrations

You will wanna use the repository methods.

1.) Delete the field 2.) Create the field 3.) Assign the field (hint, you'll need the stream)