Opened 18 years ago
Closed 18 years ago
#4820 closed (duplicate)
add ability to report inconsistencies between Django models and configured database
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev | 
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Design decision needed | |
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
Sort of taking inspectdb/syncdb a little further.  This could be a step closer to having database migration/versioning.
For example, if I had the following Model:
class Book(models.Model): name = models.CharField(maxlength=50, unique=True) author = models.CharField(maxlength=100)
the function could report things like:
- "name" field doesn't have 
UNIQUEspecified - "name" field is 
varchar(100)instead ofvarchar(50) - "name" field is set 
NULLinstead ofNOT NULL - "author" field does not exist in the database
 
Change History (2)
comment:1 by , 18 years ago
| Triage Stage: | Unreviewed → Design decision needed | 
|---|
comment:2 by , 18 years ago
| Resolution: | → duplicate | 
|---|---|
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    
Duplicate of #3271.