Opened 17 years ago

Closed 17 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: 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 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 by Gary Wilson <gary.wilson@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #3271.

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