Is there somewhere a place in the documentation where SQL migration  
strategies are explained a little?
I think I remember a paragraph in the pre-1.0-documentation that  
described what you have to do with your database when you'd like to  
add a column to your model, but I can't find it anymore.

Working with django for some weeks now, I find it quite common to want  
to add or modify a column after the db is synced and some (valuable)  
data is put in.
Since it will propably take some time that the three great migration  
apps will merge(?) somehow and find their way into trunk (at least  
that's the way I understood it when watching the video from django  
con...),
I dicided to do migration by hand.

I don't know SQL, and I find it quite hard to search for documentation  
(although there is good documentation about SQL out there...), think  
about migration strategies and tinker with differences between sqlite3  
and mysql.
So is there anywhere a short explanation of SQL from a django point of  
view out there?

My concrete problem at the moment is this:

I had the very bad idea to use models.IntegerField to store phone  
numbers (noob!).
Now I realize that some people want to put in characters like -,  
( or ), and some numbers are definitely longer than 11 digits, which  
seems to be the default with MySQL.
So I have to change the database column from

"contact_phone" integer NULL

to

"contact_phone" varchar(15) NOT NULL

As there are some entries in the database yet, even some NULLs, I have  
to think about a way to not lose this data, perhaps convert it from  
int to char (I don't know how MySQL handles data types internally) and  
replace all the NULLs with "", because NULL is no good with char fields.

Thanks for any hints,
benjamin

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to