Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Best way to clear all history and start over?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ristretto.rb  
View profile  
 More options Mar 31 2010, 7:45 pm
From: "ristretto.rb" <ristretto...@gmail.com>
Date: Thu, 1 Apr 2010 12:45:38 +1300
Local: Wed, Mar 31 2010 7:45 pm
Subject: Best way to clear all history and start over?
Hello all,

On new projects, we often go through an initial development period
that ends up with a release, and then a subsequent maintenance period.

In the initial period we like using South because sometimes you just
don't want to drop all the data you have in your dev DB.  But, more
importantly, we often run a reference implementation of projects for
various people that do not have local environments of their own.

When we get to release time, we generally drop all the application
tables and start over with fresh data.  At this point, we'd like to
toss all the migrations we have up to that point, and start over.  Our
new 001 migration should create the DB tables from the latest
approve-for-release models.  And then any subsequent migrations will
be for bugs and features against the live system.

The way I just did it is this

1.  Drop all the app tables.
2.  Delete all the migrations for the app
3.  Delete all records in the South History table

Is there an easier, saner, more proper way?

Thanks
Gene


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Godwin  
View profile  
 More options Apr 1 2010, 3:50 am
From: Andrew Godwin <and...@aeracode.org>
Date: Thu, 01 Apr 2010 08:50:44 +0100
Local: Thurs, Apr 1 2010 3:50 am
Subject: Re: Best way to clear all history and start over?
As long as you take care to do it on all deployments simultaneously,
there shouldn't be any problem with this. Personally, I'd do:

rm -r appname/migrations/
./manage.py reset south
./manage.py convert_to_south appname

(Notice that the "reset south" part clears migration records for ALL
apps, so make sure you either run the other two lines for all apps or
delete selectivey).

The convert_to_south call at the end makes a new migration and
fake-applies it (since your database already has the corresponding
tables). There's no need to drop all the app tables during the process.

Andrew

On 01/04/10 00:45, ristretto.rb wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
idan zalzberg  
View profile  
 More options Sep 27 2012, 1:47 pm
From: idan zalzberg <idanz...@gmail.com>
Date: Thu, 27 Sep 2012 10:47:29 -0700 (PDT)
Local: Thurs, Sep 27 2012 1:47 pm
Subject: Re: Best way to clear all history and start over?

I wrote a management command just for that, that doesn't harm other south
based apps in your project.
http://balzerg.blogspot.co.il/2012/09/django-app-reset-with-south.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »