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 8734987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:57:14+00:00 2026-06-13T09:57:14+00:00

I see that when you add a column and want to create a schemamigration,

  • 0

I see that when you add a column and want to create a schemamigration, the field has to have either null=True or default=something.

What I don’t get is that many of the fields that I’ve written in my models initially (say, before initial schemamigration –init or from a converted_to_south app, I did both) were not run against this check, since I didn’t have the null/default error.

Is it normal?

Why is it so? And why is South checking this null/default thing anyway?

  • 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-06-13T09:57:15+00:00Added an answer on June 13, 2026 at 9:57 am

    If you add a column to a table, which already has some rows populated, then either:

    • the column is nullable, and the existing rows simply get a null value for the column
    • the column is not nullable but has a default value, and the existing rows are updated to have that default value for the column

    To produce a non-nullable column without a default, you need to add the column in multiple steps. Either:

    • add the column as nullable, populate the defaults manually, and then mark the column as not-nullable
    • add the column with a default value, and then remove the default value

    These are effectively the same, they both will go through updating each row.

    I don’t know South, but from what you’re describing, it is aiming to produce a single DDL statement to add the column, and doesn’t have the capability to add it in multiple steps like this. Maybe you can override that behaviour, or maybe you can use two migrations?

    By contrast, when you are creating a table, there clearly is no existing data, so you can create non-nullable columns without defaults freely.

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

Sidebar

Related Questions

Hi I want to add an if statement that checks to see if a
I have an existing webapp and want to add a tag feature so that
I have SQL table that has a varchar(8) column that occasionally has binary data
When you add the Twitter Search Widget to your website, you see that the
I see that we cannot use if not exists in the create virtual table
I see that Spring has a @Required annotation to mark member variables in beans
I have very little experience designing databases, and now I want to create a
I create my relations in EER diagram and I want to see foreing key
I have a button that will create a new entry (row in a table)
Trying to create a page that allows users to add edit and view a

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.