[DBCleaner] Version 9

[DBCleaner] Version 9

  
Forge Component
(22)
Published on 17 Mar by Acácio Porta Nova
22 votes
Published on 17 Mar by Acácio Porta Nova
Hello,

DBCleaner is not working for version 9. Can this be solved?

Thanks.

Best regards,
Niek Oosterbeek.
There's a little check on what versions are supported which you can remove (or add 9.0 to it).

As far as I know there are no significant changes to the OutSystems metamodel, so it should be safe. I haven't yet gotten around to actually confirming this and I also wanted to add some other features for the next version (email cleaning, for one)
Hi Recardo,

Suggested changes would be great. I will change the check.

Thanks.
Hello Niek,

I have published version 1.4 of DBCleaner which "supports" version 9 of the OutSystems Platform as well as adds a screen to cleanup old emails.

Since I don't have a database where to test the emails feature, it might still be a little rough, but please provide feedback if you find it useful or any problems you encounter and don't do this straight on production without backups.

Best regards,
Ricardo Silva
Hi Ricardo,

When cleaning the db we get the following error "integrity constraint".

<Dec 5, 2014 10:37:21 AM CET> <Error> <outsystems.hubedition.extensibility.data.executionservice.BaseExecutionService> <BEA-000000> <) with statement:>
<Dec 5, 2014 10:37:21 AM CET> <Error> <outsystems.hubedition.extensibility.data.executionservice.BaseExecutionService> <BEA-000000> <DELETE FROM "OSADMINDEV"."OSSYS_ESPACE_VERSION" WHERE "ID" = @inParamId>
<Dec 5, 2014 10:37:22 AM CET> <Error> <outsystems.hubedition.extensibility.data.executionservice.BaseExecutionService> <BEA-000000> <Error executing ExecuteNonQuery (ORA-02292: integrity constraint (OSADMINDEV.OSFRK_OSSYS_APP_VERSION_M14981) violated - child record found>

Best regards,
Niek Oosterbeek.
Hello Niek,

It's not a problem specific to P9.

DBCleaner tries to exclude all the foreign keys to ossys_espace_version it can find from the list of versions to delete. However, some dependencies are from entities which are not exposed by (System) so I cannot exclude them.

Fortunately the Outsystems Platform protects these versions with foreign key constraints.

What I mean to say is: these errors are expected. This happens when DBCleaner tries to delete versions it cannot delete (and has no way of knowing that beforehand). These are skipped over so DBCleaner will cleanup as much as it can without breaking the platform.

I hope this was clear.

Best regards,
Ricardo Silva