Opened 9 years ago

Closed 3 years ago

#5934 closed New feature (fixed)

Database Migrations

Reported by: Patrick Altman <paltman@…> Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords: database db migration agile evolution
Cc: fred@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Something that is a bit of a pain, in an otherwise great web application framework, is managing database changes in a team environment. Initially it took me a while to realize that syncdb wasn't really syncing the database with the models, it was only creating new models.

What would be a great addition to django via would be something like the Ruby on Rails: rake db:migrate. Schema/revision the database with a table that has a revision number, and allow, no encourage, evolutionary/agile database/model development by just adding "database migrations".

Is this on anyone's radar? I know that I am not the person probably interested in such a feature. I'd be happy to help any folks that are working on it. Or provide more detailed specifications for what I think would make a solid tool.

Thanks, Patrick Altman

Change History (11)

comment:1 Changed 9 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

There isn't an 'official' way, but there are a number of user contributed projects underway attempting to do what you describe. Some of the more notable efforts:

If any of these projects get enough support, one of them may eventually be merged into the Django trunk, However, there are no immediate plans to merge anything.

I'm marking this ticket as accepted, since it reasonable idea for inclusion in Django in the long term. Since it would be a very big feature addition, any contributions should be directed to the individual projects, rather than attached to this ticket.

comment:2 Changed 8 years ago by Karen Tracey <kmtracey@…>

  • milestone set to post-1.0

comment:3 Changed 8 years ago by anonymous

  • Triage Stage changed from Accepted to Someday/Maybe

comment:4 Changed 8 years ago by adrian

  • Component changed from Tools to

comment:5 Changed 8 years ago by jacob

#5099 was a duplicate.

comment:6 Changed 8 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:7 Changed 5 years ago by gabrielhurley

  • Severity set to Normal
  • Type set to New feature

comment:8 Changed 5 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:9 Changed 5 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:10 Changed 4 years ago by aaugustin

  • Triage Stage changed from Someday/Maybe to Accepted

Andrew announced plans for adding schema alteration in core and a migrations management app in contrib.

comment:11 Changed 3 years ago by timo

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

Initial work was merged in 9aa358cedd1ad93c0f4c20700db7016651dc0598. Further work will be ticketed separately.

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