Changes between Initial Version and Version 1 of Ticket #15586, comment 1


Ignore:
Timestamp:
01/26/2013 06:10:08 AM (3 years ago)
Author:
ramiro
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15586, comment 1

    initial v1  
    1 I t is not completely clear to me what is the behavior you expect here.
     1It is not completely clear to me what is the behavior you expect here.
    22
    3 If what you are suggesting is that Django flags the divergence between the model design and its corresponding database table structure as soon as possible (e.g. at Python model field population time) it would be a waste of resources (it would need to introspect the DB table every time). IMHO current behavior is a good compromise: Let the DB-API driver/database engine to flag the error when actual interaction with the DB is performed. Remember, we are using a RDBMS plus an ORM, not a OODB, there are two separate realms, the model objects one and the database one.
     3If what you are suggesting is that Django flags the divergence between the model design and its corresponding database table structure as soon as possible (e.g. at Python model field population time) it would be a waste of resources (it would need to introspect the DB table every time). IMHO current behavior is a good compromise: Let the DB-API driver/database engine flag the error when actual interaction with the DB is performed. Remember, we are using a RDBMS plus an ORM, not a OODB, there are two separate realms, the model objects one and the database one.
    44
    55If what you are asking for is database schema evolution so it follows the model design, it is a feature that hopefully will be added in a future version and there are third party tools that implement that now (but AFAIK none of them perform ''automatic'' schema evolution so they won't be of help in cases where the developer wants to get away with changing the model design at will and hoping the software will take care of the database changes).
Back to Top