Code

Opened 7 years ago

Closed 10 months 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

Description

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 manage.py 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

Attachments (0)

Change History (11)

comment:1 Changed 7 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 6 years ago by Karen Tracey <kmtracey@…>

  • milestone set to post-1.0

comment:3 Changed 6 years ago by anonymous

  • Triage Stage changed from Accepted to Someday/Maybe

comment:4 Changed 6 years ago by adrian

  • Component changed from Tools to django-admin.py

comment:5 Changed 6 years ago by jacob

#5099 was a duplicate.

comment:6 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:7 Changed 3 years ago by gabrielhurley

  • Severity set to Normal
  • Type set to New feature

comment:8 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:9 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:10 Changed 19 months 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 10 months 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.

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.