Switch from String to Text column data type after addition of Row data causes Internal Server Error

Here is the scenario of steps to reproduce the problem.

  1. Create a new table with at least one column with a String data type.
  2. Add row data to include data that will fit within the string column (500 or less characters)
  3. Add row data to include data that will not fit within the string column (501 or greater characters)
  4. Change the Column data type from String to Text
  5. Add row data to include data that will fit within the Text column (501 or greater characters)

The error when adding a row is: Internal Server error: <GUID>

If you immediately change the data type to Text before adding any row data, the addition of row data always works.

Would it be possible for you record a screencast showing the problem?

I don’t have a problem do that but not sure what else I would show that would provide any value.

Will try to expand on the steps that will reproduce the error.

  1. Create a new table with at least one column with a String data type.
    Use the Backendless console to create a new table.
  2. Add row data to include data that will fit within the string column (500 or less characters)
  • Use of my application that write a request to save a row in the table with the column data containing less than 500 bytes.
  1. Add row data to include data that will not fit within the string column (501 or greater characters)
  • Use of my application (or cURL utility) that write a request to save a row in the table with the column data containing more than 500 bytes. An error is returned since the data to be saved exceeds the column data limits.
  1. Change the Column data type from String to Text

Use the Backendless console and select the new table. Switch to Table Schema and permissions mode. Find the column(s) that currently have the String data type and change it to Text.

  1. Add row data to include data that will fit within the Text column (501 or greater characters)
  • Use of my application (or cURL utility) that write a request to save a row in the table with the column data containing more than 500 bytes. An error is returned since the data to be saved exceeds the column data limits.

The error when adding a row is: Internal Server error: <GUID>

NOTE: If you immediately change the data type to Text before adding any row data, the addition of row data always works.

This part throws me off:

NOTE: If you immediately change the data type to Text before adding any row data, the addition of row data always works.

Isn’t it what you already do in step 4 ?

The difference is that in step 4, the table has been written to to add row data whereas the NOTE is pointing out that to avoid any error when wanting to use the larger data storage type of TEXT (21,000 bytes), then it is best to create the schema, change the STRING column types to TEXT.

I am pointing this out that there is a problem of successfully changing the column data type to support the larger column data size of TEXT. The problem appears to be that a state variable isn’t being fully updated or something when changing to the larger TEXT data type, but only in the case of have attempted to write large data (i.e. 501+ characters to a column that is of String data type.)

I would think that when upgrading/updating the column data type from 500 chars to 21.000, then the existing data would also get updated and any previous errors wouldn’t influence the future inserts of row data exceeding the previous column data length (500).

 .....whereas the NOTE is pointing out that to avoid any error when wanting to use the larger data storage type of TEXT (21,000 bytes), then it is best to create the schema, change the STRING column types to TEXT.

But the NOTE says nothing about creating the schema. All it says is the exact same thing that you already do in step 4…

Regardless of that, we will try to reproducing the steps as you described. If you could also post here the internal server error code, it would be quite helpful too.

  1. Column storage type is STRINGThe error when inserting data with a length of 1500 characters into a column that is defined with the STRING data type receives the following error:

{“code”:8000,“message”:“Property value for “ColumnName” exceeded the maximum allowed size (500)”}

lResponseCode = 413

  1. Column storage type is TEXT
    When adding data of length (501 - 21,000 characters), I received the following error code:
    Internal server error with id <GUID>

I apologize but I looked through my log files and I no longer have the errors from that action. I must have deleted the log file.

I have tried to recreate the error here and wasn’t able to. I know I have seen this error happen in the manner that I’ve described but I can’t reproduce now. I will let you know if I see this same error again.

hi there,
I would like to modify a column for an existing table and go from STRING to TEXT. When I make this change in backendless console it doesn’t complain (under ‘table schema and permissions’), but as soon as I go back to the table it says STRING again so the change is not really happening. Is it possible to change type between these two types, or is this not possible because there’s already a lot of data in that table?

Thank you for your help

Hi Alessandra,

I tried to reproduce described steps and faced no problem with changing of column type.
We can check it in your app if you provide us with App ID, table and column name which you tried to change.

Regards,
Stanislaw

thanks Stanislaw,
app ID: 9088AF67-1648-1726-FF09-A51862BF1A00
table name: DailySummaryNoCoreData
column name: customTagName5 (currently a STRING, but would like to have TEXT)

This is in production, so please do not change anything unless you are 100% sure it is not going to create problems, thanks.

Can I try just to change type of customTagName5 column to see the result?

ok, please go ahead.

Column type switcher is broken in 3d version of Backendless. As it’s no longer supported, I can suggest you to recreate that column with needed type.

Regards,
Stanislaw

I see, that’s obviously of no help but at least explains it. Maybe we should get a monthly discount given the broken functionality, this is something that should simply work, not an advanced feature of new versions of backendless. As your new versions are not backward compatible, you cannot expect people to migrate and just stop fixing issues.

We actually expect people to migrate and that’s what the majority of people are doing. We provide an incentive by making the latest version cheaper and a result we do not offer any discounts.

Regards,
Mark

hi Mark,
I’m sure you do, but obviously there can be legacy code not easily migrated, I’m sure you can understand that. You are basically saying “our software has a bug and it is not our problem despite the fact that you’ve been a paying customer for years” - anyways, I doubt this discussion is of any use,

have a good week

We still support the infrastructure for the old version, however, any bugs in the legacy version are being fixed in the new one, which has been running for 1.5 years now.

Regards,
Mark

@Alessandra_Saviotti, if you would like, we can manually change the data type of the column. We do not usually do it as a manual intervention, but, you’re a valuable customer and we want to make sure you’re happy. Please let me know.

hi Mark, that would be fantastic, I need only that column to change, everything else is working very well, really appreciate the exception you are making to help us out.