Inconsistent database table and entity definitions warning: how to resolve this?

Inconsistent database table and entity definitions warning: how to resolve this?

  
Hello everyone,

I have this situation in my project:

Inconsistent database table and entity definitions: Column <table>.<column> exists in database, but there is no corresponding attribute in entity '<entity>' : the entity definition, in your eSpace, does not include the attribute associated with < column >. You deleted this attribute from entity , but OutSystems Platform kept the corresponding column in the table. This inconsistency only occurs if the eSpace has been published with the previous entity definition.

Do one of the following: Drop column from the table, in the database, and publish the eSpace again; add a new attribute to entity with the same name as column ; or ignore the warning."


How can I drop a column from the table in the database?

Thanks for any help.

Regards.

The platform will NEVER delete anything from the database.  THis is done intentionally to prevent data loss and also to allow for rollback to previous versions of your applications.

You need to remove the column manually using e.g. SQL Server Management Studio to edit the table, or by writing a script that will drop the column and then executing the script.

Another alternative is to use the DBCleaner component available from the forge.
Thanks for the answer Izak!

I'm a begginer in OS enviromment and I'm using the trial version of the product. Is possible to use SQL Server Management with the trial version to acces the database? How can I access the Database with SQL Server? What's the "credentials" i have to use and where I can find them?

Thanks for the tips!

Regards
If you are using the trial version in the cloud, I'm afraid the DBCleaner option is going to be your only option.  Connecting to directly to the database is only possible if you are running your own platform installation.
Thanks Izak!

I will go explore the DBCleaner solution and try to figure how to drop one column on the database using that tool.

Regards

Hi all,

I renamed an attribute in one of the entities, and the result (after publishing the app) is an internal error.

In Service Studio I get the warning:

Database Integrity Suggestion
Inconsistent database table and entity definitions: column 'OSUSR_5ib_Medewerker3.NAME' exists in database, but there is no corresponding attribute in entity 'Medewerker'.

I will try to fix it with DBCleaner, don't know what else to do, but isn't this a serious bug in the OutSystems Platform? If it let me change the name of an attribute, it shouldn't result in any error situation at all??? 

I'm lost (but I'm a relative newbie :-)) ... I really didn't know how DBCleaner was going to help me out.

So, I deleted the entire app, re-installed it in my personal environment ... same error.

What caused the problem was renaming the attribute NAME to DISPLAYNAME. So I renamed it back to NAME, got the following warningmessage complaining about DISPLAYNAME now

Database Integrity Suggestion
Inconsistent database table and entity definitions: column 'OSUSR_5ib_Medewerker.DISPLAYNAME' exists in database, but there is no corresponding attribute in entity 'Medewerker'.

but publishing the app worked, running it didn't result in an internal error, however, my data is partially gone (the Name data).

I cannot imagine that, when developing and maintaining 'real' applications, changing an attribute name can or may result in problems like these. Did I do anything wrong, illegal whatever?

And, can somebody tell me how to get rid of this warning message?