How to remove physical column bound with renamed attribute?
Question

Hi,

When we rename an attribute, a new physical column is created but the old column remains untouched. This old column is unavailable to DBCleaner (it can delete columns of deleted attributes only, not renamed). After its data has been moved to the new column (it requires some tricks but is possible), this column becomes garbage. And it is reported (when publishing the entity's module) as a warning like:

Database Integrity Suggestion | Inconsistent database table and entity definitions: column '<Table>.<Column>' exists in database, but there is no corresponding attribute in entity '<Entity>'.

Is there any "legal" way to get rid of such garbage columns? When we have a full access to the DB Server it is trivial but it many cases we have only limited access (or even no access) to it.

Regards

Tomasz

Solution

Hi @Tomasz M. Lipinski ,

Some people have asked this before, please refer to this post:
https://www.outsystems.com/forums/discussion/52764/how-can-i-delete-database-fields/

Also there is some useful Outsystems documentation with viable options for this:
https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Warnings/Database_Integrity_Suggestion_Warning

Let me know if the info provided helped you in some way!

Cheers,
Paulo

Hi,

Thanks for the tips. In  my case it works:

  • rename Attr1 to Attr2; publish
  • add Attr1; publish
  • delete Attr1; publish
  • use DBCleaner to delete the physical column of Attr1

The key is that ".... OutSystems tries to reuse the existing database column  ..." 

Regards

Tomasz

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