Table dump with M2O or O2M relationship


is it possible to empty tables in a clean way without breaking the program logic. Please ? (cascading query style)
And second question, is it possible to empty, for example, its article table on the functional side?

First : it s possible but you have to get the good clean table in the good order ( foreign key )
Second : You can delete an article if it s not referenced in another table ( invoice , order …)
To « desactivate » an article you can archive it .

1 « J'aime »

ok, but if i want to empty all tables, keeping the setting. Basically going back to a blank app, which just contains created companies and login users. It’s possible ? There must be a precise procedure if we don’t want to break anything, I think.

Personally, if I can a total clean, I just drop the database and reinstall Axelor.

If I want a partial clean, I will clean the table but sometimes, I need to execute a SQL request to remove references from another table.

I m doing a dump of m’y data base with only data in tables i want to conserve or i do a reset and import input data and minimum parameters data

Ok thank you, I’ll look, but there is always a risk of creating an inconsistency when deleting data. Is it better to do it on the database side, or better to do the deletions on the GUI side?

It depends on the number of tables involved and records in those tables.
If this number is low it is better to use GUI which is simpler and less risky.
If this number is high, the operation can be very tedious.
But generally it is better to process by sql procedure directly in the database, even if it is more risky. The advantage in this case is that you can reuse the sql procedures afterwards.

1 « J'aime »

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.