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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:11:47+00:00 2026-06-12T14:11:47+00:00

I currently have a site which hosts apps and has a database of users.

  • 0

I currently have a site which hosts apps and has a database of users. Now I want to connect the two so Apps can have authors (i.e. the users)

Update: A few more pertinent details added below and I’m using django-registration.

Following this as well as the Django docs, I started by adding the author line to my apps model:

from django.contrib.auth.models import User

class App(models.Model):
    name = models.CharField(max_length=200)
    ...
    author = models.ForeignKey(User)

However, when I visit my apps from django admin I get the error DatabaseError at /admin/apps/app/ …no such column: apps_app.author_id

There are obviously more steps I need to do for this feature, but I’m curious why this simple addition is throwing an error.

I’m using South for migration and ran

./manage.py schemamigration apps --auto

For the one-off value, I set it to “zero” since it expects an int()

./manage.py migrate apps

This didn’t work so I did

./manage.py migrate apps --fake

Then the previous command again, no –fake.

Also, per the linked SO question, am I supposed to also create class User(User) in apps/models.py?

Update 2 I just created a new django app (with .manage.py startapp... not to be confused with my “app” object). I went through the steps of creating adding this foreign key and it worked fine. My only conclusion from this is that it must be a South migration issue, and not actually anything wrong with my code.

  • 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-12T14:11:49+00:00Added an answer on June 12, 2026 at 2:11 pm

    I’ve tried this both on my local and stage and this is the best solution I could come up with.

    Because, for some reason, South does not “see” that the author column needs to be added to the apps table, there is a manual schema migration option with the --add-field flag.

    I did:

    /manage.py schemamigration apps --add-field app.author
    

    Then

    ./manage.py migrate apps
    

    If that last one doesn’t work, try

    ./manage.py migrate apps --fake 000x
    

    where 000x is the migration number. You can get this from the output of the first step.

    Then restart and it should be fixed. I’ve been doing this over and over and found I got the most success when I was most specific with South. I would recommend specifying the migration number each time. The migration number carries the directions for that specific change and should directly apply the database transformation.

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

Sidebar

Related Questions

I have a Clustered Windows Hosting site which currently hosts an MVC Web Application
I currently have a web site where users can select a custom theme. After
I currently have a site which uses a MySQL 4.x schema, the site uses
In Magento, I currently have on the site category urls which have no trailing
I'm currently working on an oophp application. I have a site class which will
I'm currently trying to develop a site which queries text information. I already have
Currently I have a site where it has a header that looks something like
I currently have a django site, and it's kind of slow, so I want
I have a .NET site which integrates with PayPal. I am currently working with
Our company currently has a web site which is deployed in Windows 2000 OS,

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.