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

  • Home
  • SEARCH
  • 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 8544041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:27:25+00:00 2026-06-11T12:27:25+00:00

I added orgname = models.CharField(max_length=50) to my an existing class in my models.py and

  • 0

I added orgname = models.CharField(max_length=50) to my an existing class in my models.py and I ran python manage.py syncdb but figured out that it doesn’t create columns (I’m using PostgreSQL by the way), so I needed to do python manage.py sqlall <myapp> which I did and it outputted the following:

BEGIN;
CREATE TABLE "file_uploader_files" (
    "id" serial NOT NULL PRIMARY KEY,
    "file" varchar(100) NOT NULL,
    "orgname" varchar(50) NOT NULL
)
;
COMMIT;

Yet, when I go into the shell for Django or look in pgAdmin3, the column is still not created. What am I doing wrong? I’d add it manually but I’m not sure how.

P.S. The table was already created before hand and so was the file varchar, orgname came after I initial made that column.

  • 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-11T12:27:26+00:00Added an answer on June 11, 2026 at 12:27 pm

    Also see this SO question: update django database to reflect changes in existing models (the top two answers cover your question).

    From the accepted answer:

    note: syncdb can’t update your existing tables. Sometimes it’s impossible to decide what to do automagicly – that’s why south scripts are this great.

    And in the other another answer…

    python manage.py reset <your_app>
    

    This will update the database tables for your app, but will completely destroy any data that existed in those tables.

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

Sidebar

Related Questions

I added a configuration variable in application.rb such as module Www class Application <
I added a hoverboard on my site that flips over to reveal more text.
I added an event handler to the WebClient's DownloadProgressChanged event, but it never seems
UPDATE: Added doGet function. I have a web app that is used for a
I added a private framework to my project using link binary with libraries, but
I added to my application a lot of permissions at first, but in the
I added using Microsoft.VisualBasic to my code but compiler reports error CS0234: The type
ADDED: I see that my question is viewed often without upvotes so I decided
I added two private fields to my Java class. Eclipse prompted me to automatically
I added the following line to .gitignore : sites/default/settings.php but when I type git

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.