Improve deprecation of attributes (avoid problem when remove db column)

## Feature 

Improve deprecation of attributes (avoid problem when remove db column)