Hi guys,

We are having an issue regarding adding an index in a Table column with datatype Text and length of 4000. Outsystems is returning an issue that we cannot continue adding index because text field length is greater than 2000.

I updated the field length to 2000 and the error was gone, but when I tried to publish it, it says that "<column_name> exists in table as text (opposed to varchar) because it was previously defined with a length greater than 2000. Database text fields cannot be changed."

Hoping for your inputs, and thanks in advance!


Although OutSystems tries to create new columns in db and copies the values when you edit entity fields, the content can't be copied to the new column because server doesn't allow it. Text to varchar is one of few invalid convertions.

Solution 1 (has no use now): think before you do it. Don't create text columns unless when necessary. if you are changing it to varchar, it's because it fits in less characters.

Solution 2: You can recreate the entity and copy the entries.

Solution 1.5: create a text<2000 Field in the table. Copy content from old Field to new Field.
Optional: Delete the old field and rename the new field to old name.

I hope one of this solutions works for you.