Opened 9 months ago

Closed 8 months ago

#21305 closed Bug (fixed)

Implement initial migration detection

Reported by: timo Owned by: andrewgodwin
Component: Migrations Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently documented functionality in topics/migrations is not implemented: "This will make a new initial migration for your app. Now, when you run migrate, Django will detect that you have an initial migration and that the tables it wants to create already exist, and will mark the migration as already applied."

On SQLite, for example, you get this traceback: django.db.utils.OperationalError: table polls_poll already exists

Attachments (0)

Change History (2)

comment:2 Changed 8 months ago by timo

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

In e9cb333bc359a31c548c97dc07e392cfe39be18e:

Auto-apply initial migrations if their tables exist already.

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.