Data deleted from database

Hi CUBA team,
I am surprised that all my data from postgres database in test environment has been deleted today! This is not the first time I am using the current latest version (Studio SE and Platform v 6.7.6) though. I am wondering what could be the reason of this accident. There is no data in any of the tables where I have 422 Entities and 122 enum in my project as of today!

Any thoughts?

Hi,

The first idea is to create backups to be able to restore your data.

The second idea is to enable and configure Postgres logging to be able to check who deletes your data.

The third idea is to check Studio logs (<home_dir>/.haulmont/studio/logs/). Probably, you can find something that can help to detect a problem.

Regards,
Daniil.

If you choose “Run > Create database” and confirm the operation, the database which Studio is connected to will be dropped and recreated from scratch, which will appear as if all data was deleted. Be careful when using this option.

1 Like

Hi Konstantin, I’m wondering I might have done this. This is reminding me something! Every time we make change in database we have to run the update and generally I pass it fast. Fact is, the warnings for recreate and simple update looks the same and it’s easy to make mistakes!! Do you think you can consider the warning for recreation of database visually different E.g. colour, size etc. Or recreate database option is placed in a different place?

Hi Mortoza,

You are right, we should make this warning more prominent. Created issue: https://youtrack.cuba-platform.com/issue/STUDIO-4277

excellent! thank you.