On Mon, Feb 4, 2013 at 11:56 PM, mulianto <braveh...@gmail.com> wrote:
>
> if db schema change just do the schemamigration and migrate command in 
> production when deploy the change. if you include in in prod, how about south 
> db content? how you sync it with production site?

that's exactly how South is designed to work:

- south's DB content reflects the state of the DB, while migration
files reflect the state of the source code.

- the schemamigration --auto command creates migration files from the
models.py, but you're supposed to tweak them if necessary.  if you do,
then you have to save those changes somewhere.

- the migrate command compares migration files with DB content.  thus,
if you move migrate files with your source code to the server, where
there's 'old' south DB content it will apply precisely all the
migrations needed to bring the DB in sync with the source code


> why you would include the dev migration. if want history of metadata change , 
> it is there in models file. i mean do you git?

not if the migrations do more than what's in the models.py.   for
example, it's a good place to add SQL constraints or complex indexes.
 or data migrations...


--
Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to