1

我正在将 Django 与 MySQL 一起使用。我安装了 South 并试图将我的应用程序从一种模式迁移到另一种模式。但是,当我运行时$ python manage.py migrate catalog,出现以下错误:

 - Migrating forwards to 0003_initial.
 > catalog:0003_initial
 ! Error found during real run of migration! Aborting.

 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had 
 ! to leave it in an interim state between migrations.

! You *might* be able to recover with:   = DROP TABLE `categories` CASCADE; []
   = DROP TABLE `product_shapes` CASCADE; []
   = DROP TABLE `materials` CASCADE; []
   = DROP TABLE `style` CASCADE; []
   = DROP TABLE `products` CASCADE; []
   = DROP TABLE `products_shape` CASCADE; []
   = DROP TABLE `products_materials` CASCADE; []
   = DROP TABLE `products_style` CASCADE; []
   = DROP TABLE `products_categories` CASCADE; []

 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS.

有什么方法可以迁移而不必删除这些表。我有一种感觉,如果我放弃表格,我最终会丢失我试图保存的数据。

编辑:

我相信这是主要错误:

_mysql_exceptions.OperationalError: (1050, "Table 'categories' already exists")
4

1 回答 1

0

如果这些表中有您要保存的数据,请不要删除它们。

在没有看到实际错误的情况下很难提供任何更具体的帮助,这应该遵循您引用的消息。

于 2012-04-29T13:38:56.090 回答