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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:55:44+00:00 2026-05-27T02:55:44+00:00

I am using Django with Postgres and Heroku. and I have a post table

  • 0

I am using Django with Postgres and Heroku. and I have a post table with looks something like this.

 class Post( models.Model ):
       .
       .
       content1 = models.CharField(max_length=1000)
       .

One of my friends told me that limit is too small, now I want to change that maxlength to 10000. One way I can think of alternating the table by creating a new column named content2 then copying the content from content1, then deleting content1. I am fairly new to this and was wondering what was the best way to approach this problem.

Also is 10000 is a good length for a blog post? 😀

  • 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-27T02:55:45+00:00Added an answer on May 27, 2026 at 2:55 am

    You can either use dumpdata to save the data to a json-file and reload it after you re-create it, you can also manually ALTER the table with the new parameters. Or you can use south.

    South provides databas migrations (as its called to change a table layout) for django.

    pip install south
    

    Add south to INSTALLED_APPS then run

    python manage.py schemamigration --initial your_app_name
    python manage.py migrate --fake your_app_name
    

    Do your changes to the models.py, then run

    python manage.py schemamigration --auto your_app_name
    python manage.py migrate your_app_name
    

    Now if you have the same database layout to change on several machines, check in the created migrations-files to git and run the “migrate” commands on all the machines that needs to update.

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

Sidebar

Related Questions

I am using Postgres as DBMS and Django. My model that defines the table
Using Django 1.1.1 In models.py: class Site(models.Model): name = models.CharField(max_length=50) class SiteMonth(models.Model): site =
I using Django and a generic view django.views.generic.create_update.create_object I have a model form wich
I have python threaded application + Postgres. I am using Django's ORM to save
I'm using JSONField in some of my Django models and would like to migrate
I have a standard django setup using postgres, but I also want to access
I'm using Django 1.0.2. I've written a ModelForm backed by a Model. This model
Using Django's built in models, how would one create a triple-join between three models.
I just started using django for development. At the moment, I have the following
I created the models in a Django app using manage.py inspectdb on an existing

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.