Restore/Rollback Database to previous version


In my application we have a contact detail entity. It has an attribute Id, Firstname, Lastname, Addres, Mobile number.

This application is already deployed in production.

Now Client came up with new requirement

- Add new attribute  Landline number

- Update the Firstname attribute with title Mr, Mrs (Client do not want to add new attribute  for title in entity)

I know the logic to add attribute Landline number and updating the Firstname with title.

My Query is, If something goes wrong after deploying these new changes in production , how I can restore or rollback to previous Entity or database version.


Rank: #156

Hi Hridesh,

You can rollback using Lifetime, you can see this step-by-step documentation on how to do it.

To add on that, once you create fields on an entity and then remove them, they still exist in the database, but you won't see them in OutSystems as they are inactivated in the data model.

If you need to move data from one column to the other after rolling back, you will have to do that yourself, but from the standpoint of the code and data model, when you rollback you'll have the same situation.

If you want to revert the name the FirstName, you can very easily do that with a SQL query.
You can have a timer that reverts the Mr. / Mrs. or use SQL component to run the query to revert it.

Hope it helps you.