try deseb

http://code.google.com/p/deseb/

Its ... magic  (good and bad.  mostly good in this case)

I simply run:

./manage.py evolvedb

and the SQL to be run is shown to me with the option to run it


and then the option to save it as a schema evolution.

the idea is that you would run it on your dev, save it to the schema
evolution, deploy that to production

and then run the pre-approved SQL on the live server

there are a few bugs and issues, but they have not affected me at all.

./manage.py evolvedb
deseb: music.schema_evolution module found (13 fingerprints, 7 evolutions)
deseb: fingerprint for 'music' is 'fv1:142275253' (recognized)
music: the following schema upgrade is available:
ALTER TABLE `music_releaseimage` ADD COLUMN `just_an_example` varchar(100);
do you want to run the preceeding commands?
type 'yes' to continue, or 'no' to cancel: no
schema not saved




On Wed, Feb 4, 2009 at 4:46 PM, phyl.jack...@gmail.com <
phyl.jack...@gmail.com> wrote:

>
>
> Im fairly new to django and new to databases in general and Im just
> trying to work out how Im going to make changes to my website once its
> up and running.
> Im using mySQL, any time i add a field to one of my models I run
> syncdb but any calling already created users or comments causes an
> error. The method Ive been using during development is to just delete
> my database file and recreate it, Im obviously not going to be able to
> continue to do this.
>
> Say you wanted to add a field to an existing model on a running
> website, what is the correct and safest way to go about doing this?
>
> Thanks,
> Phil
> >
>

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

Reply via email to