19
Views
3
Comments
Unable to publish a module
Question

I am getting the following error whenever I try to publish the module. I have tried deleting the attribute that seems to be causing this, and then publish, but it did not work. I guess this all started when I set the default value of the attribute to CurrDateTime().


Database Upgrade Error


Column 'OSUSR_A5H_IQS_FOR1.CREATION_DATE_TIME' exists in database as DateTime (TIMESTAMP(6)) but the new version is defined as DateTime (TIMESTAMP). Database TIMESTAMP(6) columns can not be changed to TIMESTAMP.


ServiceStudio_KmqAVrQUny.png
2025-12-22 13-50-43
Sherif El-Habibi
Champion

Hello @Parcidio Andre,

There are two solutions here: one, you can cut and paste the table, and then the problem will be gone, but be aware that the data inside will be erased. If you want a safer approach, you can copy and paste it instead, then do your updates there, like changing the attribute data type, as OutSystems here sees it as a new table. Then, create a timer that transfers the data from the old table to the new one. After you’ve ensured the data has been successfully transferred to the new one (the one you copied), you can delete the old one.

Also, here’s an explanation of what happens: I guess you tried to change the attribute Creation_Date_Time to another data type. Under the hood, OutSystems tried to change the attribute to the data type you selected but failed, so it displayed the error below. What happens after you cut and paste is that you actually create a new table that’s why I mentioned earlier that the data will be erased, and OutSystems treats it as a completely new one, so you can do whatever you like before publishing.

This also applies to copying it, but this method is safer since you still have the data in the old one, which allows you to transfer it to the copied version using batch job (timer).

You can also check this Link which illustrates the details more clearly.

Let me know if this helps.

2025-03-01 08-39-03
Parcidio Andre

HI @Sherif El-Habibi ,
Thank for your response. 
As I mentioned above, I believe the problem started after I set the CurrDateTime() as the default value for the creation_date_time attribute, and inserted some records in the table.
So my approach to solve this was either to delete the records I had added after I changed the default value of the creation_date_time attribute to CurrDateTime(), or it was eleminate the createion_date_time attribute from the table. However, none of the approaches worked.
Moreover, Cutting and pasting seems to be a radial approach as the current table was already partitioned by the DB team, using the physical name of the table, which might change in this case.

ServiceStudio_ghlPgSEa5k.png
2025-12-22 13-50-43
Sherif El-Habibi
Champion

Thank you for the clarification.

Just to confirm, is this table coming from an external database? If so, I’d suggest reverting to the previously published version of the module and then publishing it again to see if the issue persists.

The reason is that if the table is part of an external database integration, OutSystems automatically maps TIMESTAMP fields to the DateTime type in Service Studio. It’s possible that a recent change in the external database modified the column definition from TIMESTAMP to TIMESTAMP(6). Since OutSystems enforces strict type matching, it can’t automatically revert that change it won’t convert a data type with higher precision (six fractional digits) into a lower one without manual intervention.

If this is the case, the issue likely comes from a schema change in the external database that caused a mismatch between the OutSystems entity and the actual database column which in terms requires a consultation from db team. If my understanding is incorrect, please let me know.

Also check this to know the details

https://success.outsystems.com/documentation/11/reference/outsystems_language/integration_with_external_systems/mapping_external_db_data_types_to_outsystems_data_types/

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.