WebFaction
Community site: login faq

Hi,

I know that every time I make a change to my Django model, I have to delete my database and create a new one before running manage.py syncdb. I was going to release my app soon and was wondering how I could go about making changes to my database once I release it.

Thanks.

asked 11 Aug '11, 01:41

iman453
491527
accept rate: 0%


There is basically 2 things I do to solve this,

Install south, http://south.aeracode.org/

Or, basically a juggle between dev and live databases and sites where I will manually integrate the data from the old DB to the new ones schema, this process I reserve for older sites that I have no other choice in the matter and upgrade to south ASAP.

permanent link

answered 11 Aug '11, 02:02

johns
5.4k312
accept rate: 23%

edited 11 Aug '11, 02:03

I might add that in the case of the manual route the manage.py sql* commands are very useful, https://docs.djangoproject.com/en/dev/ref/django-admin/#sql-appname-appname

(11 Aug '11, 02:05) johns

Thank you for your answer :) I will check this out.

(15 Aug '11, 23:43) iman453

Hey, I installed South and tried running the 'python2.7 manage.py convert_to_south appname' command...but it gives me the error 'There is no enabled application matching 'appname''. I was wondering what could be wrong?

(22 Aug '11, 22:43) iman453

Does the Django App in question exist? Note that this is a "Django App", not a webfaction app directory (~/webapps/appname). A "Django app" is an isolated bit of code with its own models.py file and could possibly be included in your INSTALLED_APPS.

(22 Aug '11, 22:49) ryans ♦♦

Ah, I had two apps within my 'major app'...had forgotten that's how I had built them. My bad. Thanks for your time :)

(22 Aug '11, 22:55) iman453

South is my tool of choice. You can also try Nashvegas.

permanent link

answered 22 Aug '11, 09:46

tclancy
861615
accept rate: 6%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×84

question asked: 11 Aug '11, 01:41

question was seen: 3,230 times

last updated: 22 Aug '11, 22:55

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM