Wednesday, August 24, 2011

Re: Need Ideas On Data Migration


Thanks, I am marking this thread as SOLVED :)
2011/8/24 Kayode Odeyemi <dreyemi@gmail.com>
+1 to South

Just started with it myself


On Wed, Aug 24, 2011 at 1:25 PM, Rory Hart <hartror@gmail.com> wrote:
South[1] handles database migrations. both schema and data. It can be a little tricky when first starting to use it but it is a powerful system.

Otherwise you could alter the table yourself and copy the data using SQL or the django-admin shell.



2011/8/24 Yaşar Arabacı <yasar11732@gmail.com>
Hi,

I have a model with a char field. All data saved in database in that field is a valid slug. Now I want to add this model a slug field, and copy all data from char fields to slug fields like so:

Table before change:

text = thisisavalidslug(char field)

Table after change:

text=thisisavalidslug(char field)
slug=thisisavalidslug(slug field)

Then later, I will change all char field manually to be more human readable with non-ascii letters and spaces. I just have like 10 items.
--
http://yasar.serveblog.net/

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
http://yasar.serveblog.net/

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment