Hi,

Just did a migration today. It went without any error. Following the instructions. The key was that before I upgraded to the latest satchmo I added south to the installed_apps and run manage.py syncdb to create the history table. After that upgrade to latest satchmo and run the migrate commands from the docs. To solve the 'configureable' error add product.configureable to installed_apps,
after migrate you can remove it.

Hope it helps

lzantal

On Jun 16, 2010, at 14:08, hynekcer <[email protected]> wrote:

How to upgrade by South from some version between 0.9 and 0.9.1

1) I have installed "Satchmo version 0.9.1-RC2 hg-unknown" two months
ago. Now I'am upgrading to tip.
The documentation in satchmo/docs/migrate.txt is not sufficient.

Since the database tables have already been created for your old (0.9) Satchmo installation,you need to "fake" the initial migration, or else
South will try re-creating the database tables. Do it like so::

$ python manage.py migrate product --fake 0001

Migration tries to recreate some existing fields also with "--fake
0001" and fails.

How I get the right number for "fake"?
Is it exactly the last number of the short incomplete file /satchmo/
product/migrations/00*.py in the original installation. Is it probably
a little fortune sometimes betwen commit of model and commit of
migration.


2) What about South in a new installation?

The ideal way to migrate would be to dump all of your existing store data, remove all of your old tables, synch the new models and reload the data.

For a new installation should the database be created before adding
South to configuration
(command "python manage.py syncdb" before writing 'south' to
INSTALLED_APPS)
otherwise Sathmo does not create 'product' application before trying
to install fixtures and therefor fails.

If I have not all
All these problems, if could not be easy eliminated, are woth to be
noted in documentation:

3) Problem is if I do not use all "product.modules.*".
I must insert them all before migration to installed apps, than
migrate and remove them again, otherwise got an exception:
   south.exceptions.DependsOnUnmigratedApplication:
   Migration 'product:0011_split_products' depends on unmigrated
application 'configurable'.

I can not activate one additional module no way with active South
without activating all modules.
If I try
 $ python manage.py syncdb -all
it writes that all is synced, but no table was really created:
Example:
 Synced:
 ...
product
product.modules.configurable
product.modules.custom
payment
 ...
 Not synced (use migrations):
 -

4) If I want to upgrade really all small changes to the last
development version with South active, I must do
 python manage.py migrate product
 python manage.py migrate product.modules.configurable
 python manage.py migrate product.modules.custom
 python manage.py migrate product.modules.downloadable
 python manage.py migrate product.modules.subscription
In april it was much simpler with the big split of product model by
South.

I mean that South 0.7 solves some problems and creates others.
It is mature for sofware development but juvenile as helper for
software distribution.
In the time of pubescence it needs much support in the Satchmo
documentation.

--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en .


--
You received this message because you are subscribed to the Google Groups "Satchmo 
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to