1
 Follower
6
 Likes

Drop constraints when an entity attribute is removed from the model

Database
On our radar

When i drop an attribute in the model i get a Database Integrity Suggestion
"Inconsistent database table and entity definitions: column 'OSUSR_8o1_xxx.yyy' exists in database, but there is no corresponding attribute in entity 'xxx'."

But when do an alter table to drop the column i get an error:

The object 'DF__OSUSR_8H1__xxx__753F8AB0' is dependent on column 'yyy'.

So i first have to drop the constraint before being able to drop the column. It would be nice if that was not necessary. 

I do understand why the columns aren't dropped, but i don't think the constraints serve a purpose when the column is no longer present in the model.

Created on 26 Jan 2018
Comments (1)

Also drop constraints if you delete the espace where the entity was.

Now I have a "ghost" entity with a FK to an active entity.. and I am unable to delete a record becaus ethere is a constraint on the ghost-entity.


views
471
Followers
1