Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 614503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:07:08+00:00 2026-05-13T18:07:08+00:00

I have a django model in use on a production application and I need

  • 0

I have a django model in use on a production application and I need to change the name and data type of the field with zero downtime to the site. So here is what I was planning:

1) Create the new field in the database that will replace the original field
2) Everytime an instance of the Model is loaded, convert the data form the original field and store it into the new field, then save the object (only save object if new field is empty)
3) Over time the original field can be removed once every object has a non-blank new field

What method can I attach too for the 2nd step?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:07:08+00:00Added an answer on May 13, 2026 at 6:07 pm

    Sounds complex, and effects a lot of production code.

    Are you trying to avoid doing this in bulk because of downtime? What volume of data are you working with?

    Have you looked at any Django migration tools that are out there. South is a very popular one:

    http://south.aeracode.org/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Django and Flex code: Django class Author(models.Model): name = models.CharField(max_length=30)
I have an existing Django application with a pretty typical model implementation that's backed
I have an app that makes use of 'django-registration' a custom built model named
I have a Django model that needs to represent a set of data. What
I have 3 models in django: class Movie(models.Model): mid = models.IntegerField(primary_key = True) name
I'm building a real estate site in Django and have a Home model, which
I have this models in Django class Country(models.Model): name = models.CharField(max_length=80) class Person(models.Model): first_name
I have a Django model with multiple ImageFields and use a callable to determine
I have three functions which I need in every Django Model: def __unicode__(self): return
I have a Django model with a large number of fields and 20000+ table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.