Change datatype on a collection

System Information
  • Strapi Version: 3.2.3
  • Operating System: Mac OS Big Sur 11.3.1
  • Database: sql lite
  • Node Version: 12.16.2
  • NPM Version: 7.11.2
  • Yarn Version: 1.22.10

Hi,

I am new to Strapi, and I have just created a couple of collections types, one of them has a field named description set to Long text.

I would like to change the data type from Long text to Rich text, is there a way to edit the data type on this field, or do I need to delete and recreate it with the new data type?

Thanks :slight_smile:

Simply delete and recreate with the correct datatype seems to be working fine, just be sure the datatypes are compatible, (in your case from Long text to rich text will be compatible with each other.)
if this was not the case you’d also need to remove the column from the database containing previous entries of the wrong data type to prevent errors occurring.

1 Like

This can be done by changing the field type in the collection types schema.json if the fields are compatible.