Code

Opened 7 years ago

Closed 7 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: UI/UX:

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

Attachments (0)

Change History (2)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 7 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3271.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.