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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:11:40+00:00 2026-06-17T06:11:40+00:00

I have added a new field to my model to track the individual objects

  • 0

I have added a new field to my model to track the individual objects to users.

I then generated a migration using south and it asked me for a default value for this migration as the user field has no default value. I entered 1 as the id of the user. I am using sqlite as the db backend for development. Now when I open an sqlite shell and look at the db schema, the default value is still there:

CREATE TABLE "base_category" ("user_id" integer NOT NULL DEFAULT 1,
                              "id" integer PRIMARY KEY,
                              "name" varchar(80) NOT NULL);

However in the migration file it looks like this:

# Adding field 'TimeSlot.user'
db.add_column('base_timeslot', 'user',
                  self.gf('django.db.models.fields.related.ForeignKey')
                  (default=1, to=orm['auth.User']),
                  keep_default=False)

If I understood the south docs correctly, it should not be there:

If keep_default is True, then any default value specified on the field will be added to the database schema for that column permanently. If not, then the default is only used when adding the column, and then dropped afterwards.

In other questions here on SO it was pointed out, that the default values are not handled on a db level, but in python instead.

finally my questions:

  1. Do I have to bother with the default value still in my db, as I do not need it anymore?
  2. Could it be an issue with sqlite, because I was not able to find out how to remove the default value manually using a SQL prompt?
  • 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-17T06:11:42+00:00Added an answer on June 17, 2026 at 6:11 am

    It wasn’t considered a bug, but is now; South 0.7.7 (forthcoming as I write this) should fix it.

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

Sidebar

Related Questions

I have one model User with Devise gem. I added a new field called
I have a list within Sharepoint, using a custom new form I have added
Have upgraded to eclipse.indigo using a new installation. Added m2e. Maven shows up under
I have a model: class mymodel(models.Model): order_closed = models.BooleanField(default=False) I added this field to
I have a problem when i try to create new model field type -
My storyboard seems locked. I have added new labels and imageviews to two different
I have added a new job in my hudson server which builds the project
I have IIS 7.5 With one web site I added new virtual directory and
Most of my content is in a new table I have added to JOOMLA
We recently added a new TeamCity build agent. Because it doesn't have ASP.NET MVC

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.