Opened 11 years ago

Closed 11 years ago

#4820 closed (duplicate)

add ability to report inconsistencies between Django models and configured database

Reported by: Gary Wilson <gary.wilson@…> Owned by: nobody
Component: Database layer (models, ORM) Version: master
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


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 UNIQUE specified
  • "name" field is varchar(100) instead of varchar(50)
  • "name" field is set NULL instead of NOT NULL
  • "author" field does not exist in the database

Change History (2)

comment:1 Changed 11 years ago by Gary Wilson <gary.wilson@…>

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 11 years ago by James Bennett

Resolution: duplicate
Status: newclosed

Duplicate of #3271.

Note: See TracTickets for help on using tickets.
Back to Top